-
-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One-to-One relationship is not populated in the inverse side #4879
Comments
Just one additional info, @B4nan: This test case passes when we pass the I also believe the issue is somewhere in the
IIRC, it was not recognizing the |
Hey again, @B4nan, sorry for bothering you with this - but could you shed some light for us on where we could look in the code to find the root cause for that? The info above was all that I was able to find out so far. Thanks, man! |
FYI you dont need that conditional logic in your constructor:
|
Thank you very much for the fix and the hint, Martin! We truly appreciate it! |
Describe the bug
User
has 1Profile
User
side is the inverse side (it holds theprofile_id
column)user
entityProfile
passing theuser
's id as a parameter, and using theReference.createFromPK(User, user.id)
strategyprofile_id
is not correctly populated (and therefore, theprofile_id
is not updated in the databaseStack trace
To Reproduce
Steps to reproduce the behavior:
yarn
docker compose up -d
yarn test
Expected behavior
the
profile_id
should be populated in theuser
sideAdditional context
Here are some logs for the failing test:
As you can see, the
user.profile_id
column is not updated.Versions
The text was updated successfully, but these errors were encountered: