What I try to do
Having on a same object some managed attributes and no-managed attributes, for example
/**
* @ORM_Column_Type smallint
* @ORM_Column_Null NOT NULL
*/
protected $userId;
/**
* @var Users
*/
protected $user;
Because there is non relation yet, I set $user after my entity loaded from the DB.
What don't work
When I change a no-managed attribute and I make an make an $orm->flush(), it try to update the database. Because there is no modification on my managed attributes, nothing change on DB and it cause 'Failed to update one or more records in the database.' exception.
What it should be done
The TrackedCollection should only compare the "UnkeyedValues"