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 committed Aug 8, 2024
1 parent 521914e commit cf5f6bb
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 cf5f6bb

Please sign in to comment.