[FLOW3-general] Error: Column identifier is not unique
Michael Sauter
mail at michaelsauter.net
Mon Mar 8 18:47:19 CET 2010
Hi,
I have a similar setup to the blog example: A "parent" model (like the
blog model) and a "child" model (like the post model). The children are
stored in a SplObjectStorage in the parent, and every child holds a
reference to its parent. The only difference that I can see at the
moment is that my parent model is an aggregate root (there is no
repository to get the child models). Parent and child are edited in two
separate controllers: ParentController (which is basic CRUD) and
ChildController (basic CRUD as well, but all actions get a parent object
as an argument). In order to update the children of a given parent, I
call an updateChild() method in the parent which "exchanges" the
original child with the edited one (by getting the identifier from the
persistence manager for both original and edited object).
Now, I can created and edit parent objects without problems as long as I
don't add any children. Once a child is added, I get the following error
upon editing the parent (editing the child works fine):
#23000: SQLSTATE[23000]: Integrity constraint violation: 19 column
identifier is not unique (More information)
PDOException thrown in file
Packages/Framework/FLOW3/Classes/Persistence/Backend/PdoBackend.php in
line 178.
Any ideas what I'm doing wrong here? (Or could this be a bug?)
Thanks,
Michael
More information about the FLOW3-general
mailing list