Replies: 2 comments 1 reply
-
/cc @geoand (spring) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Feel free to open a new issue asking for this feature. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I came across an already on other sites discussed problem related to composite primary keys in the spring data jpa extension. (Related Discussion: https://stackoverflow.com/questions/61211391/are-composite-primary-keys-in-jpa-with-quarkus-possible)
As far as I can tell from my research and testing the Quarkus Extension is currently not capable of handling composite primary keys with the @IdClass Annotation of JPA. A neat workaround is just to use the @EmbeddedId Annotation to solve the error.
But this workaround comes to an end when you need to have a @GeneratedValue annotation to creat sequences as part of your primary key. The reason for that is that as shown here https://thorben-janssen.com/composite-primary-keys-sequence/#Mapping_an_EmbeddedId these generators only work with the @IdClass Annotations.
So it seems for me that this feature is either currently not supported, or im missing out on something fundamentally.
Anyways I would be really happy to hear your guys thoughts on this one.
Kind regards :)
Beta Was this translation helpful? Give feedback.
All reactions