-
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
Throw exception (or do something) when cascading is set on element map with composite key #312
Comments
I am just asking here ,because I am not so familiar with elements (have worked with them recently though) , since elements are (usually) scalar values that there's no matching entity for them , is it possible to have one with non-composite key columns? |
Yes, composite keys work fine with element maps. I'm using it a lot, although it might not be considered the best design, but I specifically wanted to stay clear of surrogate IDs in my case. It's just cascading that's not supported. |
Sorry, I misread your question. Yes, it's very possible to have NON-composite key columns too. |
Currently, an element map with composite key cannot have cascading set. Refer to https://nhibernate.jira.com/browse/NH-2515
But I keep forgetting that and when I have my mapping as e.g.
then I keep expecting that it should work. Surely this will confuse other users too. My suggestion is that FNH throw an exception or shows some other kind of warning when the schema builder tries to set the cascade property on an element map.
The text was updated successfully, but these errors were encountered: