-
Notifications
You must be signed in to change notification settings - Fork 96
Persist of entity mapped with a non nullable association causes UnsupportedOperationException #1077
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
Comments
@DavideD I pushed some tests to a branch that replicates the error as well as starts adding the missing implementations to wrap the logic to discover any non-nullable dependent entities. Got down to I'm stuck right now because most of the implementation on the ORM side is in an internal package. There's already a hibernate Not sure how to proceed to get past the hidden/private/internal ORM code. I'll ping you first thing Monday ... with more questions :) |
It's a bit tricky, but at first glance you need to add a method to our ForeignKeys that mimics The implementation of this method needs to call the |
My commits start down that road... here. My roadblock is with ORM's |
Ok, but you don’t have to extend the classes, you need to copy and adapt the code for the method
… On 28 Jan 2022, at 20:06, Barry LaFond ***@***.***> wrote:
My commits start down that road... here.
My roadblock is with ORM's NonNullableTransientDependencies and ForeignKeys internal classes.. they are final and access to NonNullableTransientDependencies.add(String propertyName, Object transientEntity) isn't available. So implementing a reactive ForeignKeys.collectNonNullableTransientEntities(...) to "add" non-nullable entities isn't possible.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.
|
I see now. |
Waiting fo rORM 5.6.7.Final |
Mapping example:
Setting either
nullable = false
oroptional = false
will cause the following exception during a persist:The text was updated successfully, but these errors were encountered: