Hi

With Doctrine you could do that to have a enum with a foreign key


Resource:
  tableName: resource
  columns:
    id: { type: integer(4), primary: true, autoincrement: true }
    resource_type_id: { type: enum, values: [value1, value2, value3],
notnull: true }
    name: { type: string(255) }
  relations:
    ResourceType: { local: resource_type_id, foreign: id, type: one }


ResourceType:
  tableName: resource_type
  columns:
    id: { type: enum, primary: true, values: [value1, value2, value3] }
    name: { type: string(255), notnull: true }
  relations:
    Resources: { class: Resource, local: id, foreign: resource_type_id,
type: many }


Olivier



> -----Message d'origine-----
> De : symfony-users@googlegroups.com [mailto:symfony-
> us...@googlegroups.com] De la part de vegoi...@alumni.uv.es
> Envoyé : mardi 15 décembre 2009 11:20
> À : symfony-users@googlegroups.com
> Objet : [symfony-users] enum in config/schema.yml
> 
> Could I do a enumeration in the file schema.yml?
> In other words, I need the attribute authors like a enumeration of ids.
> This ids would be foreign keys of the entity person or something like
> that. How can I do it?
> 
> --
> 
> You received this message because you are subscribed to the Google Groups
> "symfony users" group.
> To post to this group, send email to symfony-us...@googlegroups.com.
> To unsubscribe from this group, send email to symfony-
> users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en.


--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to