symfony - FOSUserBundle One-To-One mapped Entity not saved -
Hi guys, I have a question about applying one-to-one in Entity FosUserBundle.
User Mapping is a mapping with the entity unit unit I have overridden the original RegistrationFormType, as shown in the documentation of Faususerbundle. The record has also been saved in both tables. But mapping institutions show me empty data
li> < P> ProfileFormType Summary -
Registry FormType Gist -
The problem with your implementation is that you do not update the bidirectional union clearly:
Check that the owner of the relationship has the foreign key in favor How is defined, Alika cart.
In your case, the proprietary aspect is
profile which you can automatically update to
setUserId () in the form of folds:
public function setUserId (\ XXXX \ Bundle \ UserBundle \ Entity \ user $ userId = null) {$ this- & gt; UserId = $ userId; $ UserId- & gt; SetProfile (this $); $ This return; }
You can access the data from both sides of the relationship without problems, theories will see the same entries.
Comments
Post a Comment