Replies: 1 comment 3 replies
-
|
I want to check the optimistic lock of entity2 when I update entity1. And the entity2 is defined like below: |
Beta Was this translation helpful? Give feedback.
3 replies
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.
-
I already update micronaut version to latest and micronaut-data is 3.9.1. I don't know whether it is a bug of micronaut-data.
in my entity, there is a field use annotation below:
when I use repository.update(entity1), I found the generated sql without version like below:
10:10:34.134 [Test worker] DEBUG io.micronaut.data.query - Executing SQL query: UPDATE "entity2" SET "deleted_at"=?,"updated_at"=? WHERE ("id" = ?)And the updated sql for entity1 is correct like below:
10:10:34.139 [Test worker] DEBUG io.micronaut.data.query - Executing SQL query: UPDATE "entity1" SET "entity1_id"=?,"version"=? WHERE ("id" = ? AND "version" = ?)Beta Was this translation helpful? Give feedback.
All reactions