Lets say i have 2 Entities, User and Address. Each User has to have an Address so there is an one-to-one relation between the tables.
Now i want to generate a user and it should automatically create an address row without data and just mark their relation.
Is this possible in the Entity or in the EntityRepository Class? Or is there a command that does this automatically?
Thanks
First, you don’t need it. Use Null Object pattern.
Second, if you really need it:
And set cascade persist: