Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public void deleteAllByIdInBatch(Iterable<ID> ids) {
* Some JPA providers require {@code ids} to be a {@link Collection} so we must convert if it's not already.
*/

if (Collection.class.isInstance(ids)) {
if (ids instanceof Collection) {
query.setParameter("ids", ids);
} else {
Collection<ID> idsCollection = StreamSupport.stream(ids.spliterator(), false)
Expand Down Expand Up @@ -854,11 +854,13 @@ private <S> TypedQuery<S> applyRepositoryMethodMetadata(TypedQuery<S> query) {
}

LockModeType type = metadata.getLockModeType();
TypedQuery<S> toReturn = type == null ? query : query.setLockMode(type);
if (type != null) {
query.setLockMode(type);
}

applyQueryHints(toReturn);
applyQueryHints(query);

return toReturn;
return query;
}

private void applyQueryHints(Query query) {
Expand Down