Skip to content

Commit

Permalink
Use the proper PU for executeUpdate on entityClass
Browse files Browse the repository at this point in the history
Fixes quarkusio#42314
Introduced by quarkusio#41547
  • Loading branch information
gsmet authored and danielsoro committed Sep 20, 2024
1 parent 0ffeeae commit b604544
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ public int executeUpdate(Class<?> entityClass, String panacheQuery, Object... pa

try {
String updateQuery = PanacheJpaUtil.createUpdateQuery(entityClass, panacheQuery, paramCount(params));
return bindParameters(getSession(DEFAULT_PERSISTENCE_UNIT_NAME).createMutationQuery(updateQuery), params)
return bindParameters(getSession(entityClass).createMutationQuery(updateQuery), params)
.executeUpdate();
} catch (RuntimeException x) {
throw NamedQueryUtil.checkForNamedQueryMistake(x, panacheQuery);
Expand Down

0 comments on commit b604544

Please sign in to comment.