-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to add parts to the project: FK constraint violation #129
Comments
Here is the backtrace of the Exception: #0 /usr/share/php/Doctrine/DBAL/Statement.php(131): PDOStatement->execute(NULL) |
I'm not sure where this comes from. I just did a quick test on pgsql8, and it works for me. Also no project_id in the part table here. Can you reproduce this on your nightly-20120106, or was this an one-timer? |
Issue is caused by wrong entity relation in ProjectPart.php and has been fixed in the meantime PartKeepr: Felicitus master * r1cf520f / src/backend/de/RaumZeitLabor/PartKeepr/Project/ProjectPart.php : Fixed wrong entity type for project parts - http://git.io/jId9vg |
Affected databases can be fixed with the following SQL statement ALTER TABLE projectpart DROP CONSTRAINT fk_b0b19336166d1f9c; ALTER TABLE projectpart ADD CONSTRAINT fk_b0b19336166d1f9c |
I believe this can be closed now. |
This is a problem within Doctrine and it is unfortunately not yet fixed. The upstream bug is http://www.doctrine-project.org/jira/browse/DDC-1586 |
Reminder sent to the doctrine devs, there's nothing left I can do. Moving to the next milestone and keeping open for tracking. |
This is now fixed according to the doctrine developers: http://www.doctrine-project.org/jira/browse/DBAL-479 Please test, I'm closing this bug as I haven't been hit by it. |
When trying to add a part to the project I get the following SQL Exception
SQLSTATE[23503]: Foreign key violation: 7 ERROR: insert or update on table "projectpart" violates foreign key constraint "fk_b0b19336166d1f9c" DETAIL: Key (project_id)=(3) is not present in table "part".
Why is he trying to find the the project_id in table part?
This issue appies to nightly-20120106 and does NOT happen on a newly created database. Can't tell how to reproduce this right now.
The text was updated successfully, but these errors were encountered: