mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-685: Bug in BasicEntityPersister #844
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 (Jul 12, 2010).
Jira issue originally created by user avi:
I have Entity:
class Comments
{
/****
* @Column(type="integer")
* @Id
* @GeneratedValue(strategy="IDENTITY")
*/
private $commentId;
/****
* @Column (type="integer", nullable=true)
*/
private $userId;
...
here i have field userId, and relation with another table on this field.
Where i`m trying to insert (flush) new record in table, i get null value in field userId.
In method _prepareUpdateData (class BasicEntityPersister) field userId overlaps by field of "attachable" table Clents - userId, and sets to null.
@doctrinebot commented on GitHub (Jul 12, 2010):
Comment created by @beberlei:
First: your mapping is wrong, you are not supposed to map foreign keys. UserId is supposed to be a ManyToOne relation with the User class.
Second: If you want to do this anyways, there is arleady two issues for it: DDC-419 and DDC-522
@doctrinebot commented on GitHub (Jul 12, 2010):
Issue was closed with resolution "Invalid"