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 [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