mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1316: Insert statement for joined subclass presister doesn't type change the id values for subtables #1651
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Aug 3, 2011).
Originally assigned to: @guilhermeblanco on GitHub.
Jira issue originally created by user vigor_bg:
Hi there,
I am using "Class Table Inheritance" and this are my entities.
As you can see i am using composed id keys. The problem that i get is when building the insert statement the value for the second key which is type datetime is not transformed to date transformed but cast to integer and in the data base i got inserted value of 0000-00-00 00:00:00 instead of the date that i have given. After i did a bit of debugging i found the problem to be in the "Doctrine\ORM\Persisters\JoinedSubclassPersister" on line 163.
As you can see when you are binding the values for the subtable ids you are not giving the type for the id. So for me to work i did a quick fix:
I hope that you will have time to take a look in to that problem soon as it is important for my project. Otherwise great work so far with the "ORM" :)
Have a nice day,
Victor
@doctrinebot commented on GitHub (Aug 3, 2011):
@doctrinebot commented on GitHub (Aug 6, 2011):
Comment created by @beberlei:
Even if we fixed that it wouldn't work to have a DateTime as primary key. Since PK values need to be "stringable".
@doctrinebot commented on GitHub (Aug 6, 2011):
Comment created by @beberlei:
Changed to improvement and link to DDC-1320
@doctrinebot commented on GitHub (Sep 5, 2011):
Comment created by @guilhermeblanco:
Even though DateTime would be solved in a different way, I think the patch must be applied specially because the identifier can be anything else, including a user customized type.
I fixed this issue by commit:
666691f84f@doctrinebot commented on GitHub (Sep 5, 2011):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Sep 25, 2011):
Comment created by @beberlei:
Set to 2.2-DEV as one thing is unclear for me, see commit comment.
@doctrinebot commented on GitHub (Oct 31, 2011):
Comment created by @beberlei:
Merged into 2.1.x