We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With structure like:
@MappedEntity("foo") public record Foo( @Id String id, @Nullable @Relation(Relation.Kind.ONE_TO_MANY) @JoinColumns({ @JoinColumn(name = ID_COL, referencedColumnName = "foo_id") }) List<Bar> bars,
@MappedEntity("bar") public record Bar( @NonNull String anotherReferenceId, @NonNull String yetAnotherReferenceId, @NonNull String fooId,
The goal is to list Bar instances by fooId.
fooId
When trying to use this structure, it fails compilation with an error:
Unable to implement Repository method: FooRepository.getById(String id). Associated entity [Bar] defines no ID. Cannot join.
However join column is explicitly specified, therefore it should not be required.
Workaround: Create composite ID from all 3 reference fields in Bar - then join works as expected.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue description
With structure like:
The goal is to list Bar instances by
fooId
.When trying to use this structure, it fails compilation with an error:
However join column is explicitly specified, therefore it should not be required.
Workaround: Create composite ID from all 3 reference fields in Bar - then join works as expected.
The text was updated successfully, but these errors were encountered: