mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
NaturalKeyQueryData use the matchSingleProperty + IntelliJ Inspect various improvements
The non-use of the matchSingleProperty meant it fell back to the multi-property match
This commit is contained in:
@@ -142,7 +142,9 @@ public final class NaturalKeyQueryData<T> {
|
||||
*/
|
||||
private boolean matchProperties() {
|
||||
if (naturalKey.isSingleProperty()) {
|
||||
naturalKey.matchSingleProperty((inProperty != null) ? inProperty : eqList.get(0).property);
|
||||
if (naturalKey.matchSingleProperty((inProperty != null) ? inProperty : eqList.get(0).property)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// multiple properties case
|
||||
|
||||
@@ -314,7 +314,7 @@ public interface SpiQuery<T> extends Query<T>, SpiQueryFetch, TxnProfileEventCod
|
||||
* Return true if select all properties was used to ensure the property
|
||||
* invoking a lazy load was included in the query.
|
||||
*/
|
||||
boolean selectAllForLazyLoadProperty();
|
||||
void selectAllForLazyLoadProperty();
|
||||
|
||||
/**
|
||||
* Set the select properties.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package io.ebeaninternal.server.deploy;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -442,14 +442,12 @@ public class DefaultOrmQuery<T> extends AbstractQuery implements SpiQuery<T> {
|
||||
* included in the query.
|
||||
*/
|
||||
@Override
|
||||
public final boolean selectAllForLazyLoadProperty() {
|
||||
public final void selectAllForLazyLoadProperty() {
|
||||
if (lazyLoadProperty != null) {
|
||||
if (!detail.containsProperty(lazyLoadProperty)) {
|
||||
detail.select("*");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private List<OrmQueryProperties> removeQueryJoins() {
|
||||
|
||||
Reference in New Issue
Block a user