Delete all not supported for entities with no ID - Groovy and JPA #1578
Unanswered
bbudzynski
asked this question in
Q&A
Replies: 1 comment
-
It should work. Any idea what’s wrong @graemerocher @burtbeckwith ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have an issue with a very simple application I'm writing.
The persistence is handled with micronaut-data /w JPA, the DB is H2 for now.
I have a
Comment
model which looks like this:Then, I have a repository like the one below:
Some simple test to run it:
And what I get when I try to run it is:
Even if I simplify the
Comment
model to only consist of ID, no matter how I create it, if I explicitly add getters and setters - I always get this error.Same with changing annotations to use the ones from Jakarta,
@Entity
and not@MappedEntity
- nothing seems to help.The only ref I found was this issue but it's not very helpful in my case.
Here's my
application.yml
:and the
pom.xml
:One more thing:
If I change the
Long id
to something else, likeLong comId
I get:[ERROR] Unable to implement Repository method: CommentRepository.findById(Object id). Cannot query entity [Comment] on non-existent property: Id
Can you please take a look and tell me, what am I doing wrong here?
Beta Was this translation helpful? Give feedback.
All reactions