thanks for answering.
How do I create some fixtures for the relation between the following
two objects?

fixtures.yml
User:
  user_0:
    name: Tim
Video:
  video_0
    title: a cool video

UserProduction:
  video_0_user_0:
    User: user_0
    Production: video_0

fails: "Invalid row key specified: (production) video_0, referred to
in (user_production) video_0_user_0"

This:
UserProduction:
  video_0_user_0:
    User: user_0
    Video: video_0

fails: "SQLSTATE[HY000]: General error: 1452 Cannot add or update a
child row: a foreign key constraint fai
ls (`p4`.`user_production`, CONSTRAINT
`user_production_user_id_production_id` FOREIGN KEY (`
user_id`) REFERENCES `production` (`id`))"


On 3 Mai, 08:50, Tom Ptacnik <[email protected]> wrote:
> if you have your m:n relation defined correctly then simply by $video-
>
> >getUsers();
>
> On 2 kvě, 10:36, comb <[email protected]> wrote:
>
>
>
> > anyone? :-(
>
> > On 29 Apr., 08:01, comb <[email protected]> wrote:
>
> > > Hi!
>
> > > is there a tutorial on inheritance of many-to-many relations work?
> > > Assume the following schema. How can I get all Users that participate
> > > on a Video?
>
> > > Production:
> > >   columns:
> > >     title: string(255)
> > >   relations:
> > >     Participants:
> > >       class:        User
> > >       local:        user_id
> > >       foreign:      production_id
> > >       refClass:     UserProduction
> > >       foreignAlias: Productions
> > >       onDelete:     SET NULL
>
> > > UserProduction:
> > >   columns:
> > >     user_id: { type: integer, primary: true }
> > >     production_id: { type: integer, primary: true }
>
> > > Video:
> > >   inheritance:
> > >     extends:  Production
> > >     type:     concrete
> > >   columns
> > >     video: string(255)
>
> > > Audio:
> > >   inheritance:
> > >     extends:  Production
> > >     type:     concrete
> > >   columns:
> > >     res: string(50)
>
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it to 
> > > security at symfony-project.com
>
> > > 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 
> > > athttp://groups.google.com/group/symfony-users?hl=en
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > 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 
> > athttp://groups.google.com/group/symfony-users?hl=en
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> 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 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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