-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fully support and test IdClass usages #399
Comments
After a quick search, the most problematic method seems to be Primarily I think this method fails to address two things:
We probably need a new method For this I primarily see two approaches:
Small list of things that almost certainly won't work right with IdClass:
|
I think most uses can be adapted to work properly, except for values queries and |
I'll extend my PR gradually as I try rewriting all occasions of Note to self: also look at uses of |
I just ran into this issue while trying out this library. This is a show stopper for us. |
@ieugen can you elaborate what it is that isn't working for you? The support for keyset pagination with id class attributes is currently on master and will be in the next release. |
I can revive the PR after I finish working on #571. |
Well, my ap won't even start. I have a bunch of entities, one with composit pk using IdClass in Postgres, as i provided link. Lets call it CompositA. In another entity I have a @OnetoOne with CompositA with field When the app starts it fails to create CBF object from blaze. It can't find field |
Can you please share the stacktrace so we can further analyze this? |
Sorry, I migrated away from this and did not save the stack trace. Next time I will be more careful. |
That's too bad, on master we already have support for the most important parts of IdClass support but it's just not released yet. I'll ping you when it's released and hope you can give it another shot! |
Based on the description I think this is an issue with compound keys (or multiple JoinColumns) rather than |
Yes, that is where I had issues, the 2 join columns. |
The |
I tried all combinations but none of it is working for the composite primary key. it fails with below exceptions.
It seems I am not using the mapping correctly. @beikov, can you guide with the mapping for composite primary key. |
Right now we support IdClass everywhere in Blaze-Persist Core, but Blaze-Persist EntityViews does not support compound keys using IdClass yet. A lot of progress has been made to eventually support it, such as making sure Blaze-Persist core is ready in the last 1.3.0 release. Alex and I have contributed to that as well and also done some preliminary work on supporting IdClass entities in EntityViews. Christian has worked on the But today we don't support id class entities yet, and for compound keys in entityviews you're limited to using |
If
|
Thanks @jwgmeligmeyling, @beikov |
I frequently check for IdClass support in Blaze-Persistence core. But we haven't had much time to look into doing this for EV's as well. Since, I believe it has actually gotten a fair bit more complicated with all the work on updatable EVs. Should we close this issue? Or at least change the labels so it indicates that the work needs to be done in EV and not core. |
Currently we often assume that there is only a single id mapped in a JPA type although there could be multiple. We should fix these cases and write some tests that use
IdClass
to make sure it works.The text was updated successfully, but these errors were encountered: