Guyz,

I'm have problems with relationships here, look. I haver 2 tables,
Todo, TodoPriorities.

The Todo store things to do and TodoPriorities, types of priorities
for todo.

My doubt is how to link to priorities id but showing priority mane in
the select box, in the administrator?

i will send the schema.yml and generator.yml, please help me

[SCHEMA.YML]
---
propel:
  todo:
    _attributes: { phpName: Todo }
    id:
      type: INTEGER
      primaryKey: true
      autoincrement: true
    name:
      type: VARCHAR
      size: 20
      required: true
    description:
      type: LONGVARCHAR
    do_at:
      type: TIMESTAMP
      required: true
    created_at:
    priority:
        type: INTEGER
        required: true
        size: 3
        foreignTable: todoPriorities
        foreignReference: id
    status:
      type: INTEGER
      required: true
    _indexes:
      (todo autoindex 1):
        - id
  todoPriorities:
    _attributes: { phpName: TodoPriorities }
    id:
        type: INTEGER
        primaryKey: true
        autoincrement: true
    name:
        type: VARCHAR
        size:  5

[GENERATOR.YML]
generator:
  class:              sfPropelAdminGenerator
  param:
    model_class:      Todo
    theme:            default

    fields:
        name:
            name: Nome da Tarefa
        description:
            name: Descrição
        do_at:
            name: Fazer em
            params:
                date_format: hh:mm:ss - dd/MM/yyyy
        created_at:
            name: Criado em
            type: plain
            params:
                date_format: hh:mm:ss - dd/MM/yyyy
        priority:
            name: Prioridade
        status:
            name: Situação

    list:
        title: Lista de Tarefas
        #display: [=name]

    edit:
        title: Editando tarefa %%name%%


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to