Open JoshuaJClark opened 10 years ago
Can you detail a very simple list of calls which will cause this to occur here?
$dfd = new DataFlowDiagram( $this->storage);//create a Diagram $df = new DataFlow($this->storage, $dfd->getId());//add a Link to the Diagram $dfd->refresh();//update the local memory to match the DB $dfd->update();//call update and this generates a pdo exception
copy of the exception:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (dedc
.element_list
, CONSTRAINT element_list_ibfk_1
FOREIGN KEY (elementId
) REFERENCES entity
(id
) ON DELETE CASCADE ON UPDATE CASCADE)
when the save (being called by update()) function is called on a diagram with anything currently in its linkList, nodeList or diaNodeList is called an exception is generated, this appears to be caused by the things in the lists not having an entry in the entity table