Details
Description
We have the following three entities:
User
Participant
Profile
... Users and Participants are two distinctly different things in our system and each has a Profile. Currently we use OneToOne unidirectional associations to "map" the User to it's Profile and a Participant to it's Profile. So far (2.0) we've been able to do the following:
$profile = $user->getProfile();
$profile->setLastName('Doe');
$em->persist($profile);
$em->flush();
...and the profile is saved. In 2.1 rc1 this no longer works.
After some testing it was determined that 2.1 is requiring that our Profile refer back to each object (bidirectional). Now, this may not be the best example but imagine we had another entity that wanted to make use of a Profile, we'd rather not have to explicitly add the reference back for each entity that wants to use it just to get it persisted.
Again, in 2.0 our setup worked fine and so far I've been unable to find any documentation pointing to this sort of thing.
Issue Links
- is duplicated by
-
DDC-1228
Unidirectional OneToOne Associations do not get persisted
-
Is this relation marked as FETCH=EAGER? Can you post the mapping files of User and Profile please?