type: many didn't change the problem

On 4 Mrz., 09:24, romain godefroy <romain.godef...@wanadoo.fr> wrote:
> hi,
>
> Have you tried to defined the relation with
> type: many
> I don't know if it could change anything for you but it should be
> test ?
>
> On 3 mar, 20:56,axelat <axel.zu...@gmail.com> wrote:
>
> > I have a list of persons, and an m:n relation that relates one person
> > with several other persons:
>
> > Person:
> >   columns:
> >     id
> >       type: integer(4)
> >       primary: true
> >     name: string(255)
> >   relations:
> >     # m:n Person2Person
> >   Person:
> >       class: Person
> >       refClass: Person2Person
> >       local: id
> >       foreign: related
> >       foreignAlias: contactPerson
>
> > # m:n
> > Person2Person:
> >   columns:
> >     id:
> >       type: integer(4)
> >       primary: true
> >     relatedId:
> >       type: integer(4)
> >       primary: true
> >   relations:
> >     Person:
> >       class: Person
> >       local: relatedId
> >       foreign: id
> >     Person2:
> >       class: Person
> >       local: id
> >       foreign: id
>
> > in the PersonFrom class i use
> > $this->embedRelation('RelatedPersons', "myRelatedPersonForm");
>
> > everything works fine:
> > symfony embedds 1 to n related person forms into the main person form
> > also updates work fine
>
> > the problem ist following:
> > each time saving the form symfony commits a query like:
>
> > update person2person set id = 100 where (id=200 and relatedId=100)
>
> > (200 is the id of the main form and 100 the "relatedId")
>
> > and of course this destroys the realation.
>
> > any idea whats wrong and why this happens?

-- 
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 symfony-users@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