Hey...if that is the exact replica of the schema in the YAML file, you are
getting the identation wrong.
It should be
Ticket:
   actAs:
   ....

basically, make sure u space out the columns twice after the table...other
than that...put your column attributes in curly brackets such as
id: {type: INTEGER, size: 4, primary: true,autoincrement: true }

For something that is a primary key, such as the id above, the following
should suffice

id: ~
On Sun, Nov 29, 2009 at 8:36 AM, Trailfinder <[email protected]> wrote:

> Hi All,
>
> Could somebody help me with a schema for a ticketing system. Problem
> is that after reading the documentation on both Symfony and Doctrine I
> still have problems figuring out how to use relations in YAML.
>
> Ticket:
>  actAs: [Timestampable]
>  columns:
>  id:
>    type: integer(4)
>    primary: true
>    autoincrement: true
>  tickettype_id:
>    type: integer
>  tickettext:
>    type: clob(65532)
>  actions:
>    type: clob(65532)
>  ticketnumber:
>    type: integer
>  user_id:
>    type: integer
>  created_at:
>   type: timestamp
>   notnull: true
>  update_at:
>    type: timestamp
>  relations:
> Tickettype:
>    type: one
>  User:
>    type: one
>
> User:
>  columns:
>  id:
>    type: integer(4)
>    primary: true
>    autoincrement: true
>  firstname:
>    type: string(255)
>  lastname:
>    type: string(255)
>  email:
>    type: string(255)
>  username:
>    type: string(255)
>  password:
>    type: string(255)
>  active:
>    type: enum
>    values: [yes,no]
>  level:
>    type: integer(2)
>
> Tickettype:
>  columns:
>  id:
>    type: integer(4)
>    primary: true
>    autoincrement: true
>  name:
>    type : string(255)
>
> I tried something like the above without any luck. Clearly I don't
> understand how relations work in YML and Doctrine.
>
> So can someone help me how to do this or suggest a better way to build
> a ticket system in Symfony.
>
> Thanks!
>
> --
>
> 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]<symfony-users%[email protected]>
> .
> 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 [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