-
Notifications
You must be signed in to change notification settings - Fork 688
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
Multiple One-To-One to same entity #458
Comments
try to change it should work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm fairly new to NHibernate and recently went over from ODM for this new project.
Not sure if I'm thinking crazy here with this design or this is a limitation in fnh:
My ShipmentPlan entity has two nullable columns, PackPlanId and LoadPlanId. They are referencing the same entity so I'm trying to figure out some kind of one-to-one mapping for both columns.
After desperate trial-and-errors, the only setup I have some success with is is the mapping below.
The problem is when I try to save the entity, even though the references looks right before saving, it crashed because ShipmentPlanId is not assigned and not in the insert query.
Entity before saving:
Query:
The success I had with this setup is I can fetch the entities correctly but as you see the saving part is not working.
Is this a issue in the design or mapping?
The text was updated successfully, but these errors were encountered: