diff --git a/src/main/java/com/avaje/ebean/bean/EntityBeanIntercept.java b/src/main/java/com/avaje/ebean/bean/EntityBeanIntercept.java
index 4f6f9362a..bf1abcfdf 100644
--- a/src/main/java/com/avaje/ebean/bean/EntityBeanIntercept.java
+++ b/src/main/java/com/avaje/ebean/bean/EntityBeanIntercept.java
@@ -343,28 +343,10 @@ public final class EntityBeanIntercept implements Serializable {
}
/**
- * Check if the lazy load succeeded. If not then mark this bean as having
- * failed lazy loading due to the underlying row being deleted.
- *
- * We mark the bean this way rather than immediately fail as we might be batch
- * lazy loading and this bean might not be used by the client code at all.
- * Instead we will fail as soon as the client code tries to use this bean.
- *
- * @param lazyLoadPropertyIndex the property that is expected to be loaded
+ * Set lazy load failure flag.
*/
- public boolean isLazyLoadFailure(int lazyLoadPropertyIndex) {
- if (lazyLoadProperty != -1 || !isLoadedProperty(lazyLoadPropertyIndex)) {
- lazyLoadFailure = true;
- return true;
- }
- lazyLoadFailure = false;
- return false;
- }
-
- /**
- * Set the Id of the owner bean.
- */
- public void setOwnerId(Object ownerId) {
+ public void setLazyLoadFailure(Object ownerId) {
+ this.lazyLoadFailure = true;
this.ownerId = ownerId;
}
diff --git a/src/main/java/com/avaje/ebeaninternal/api/LoadBeanRequest.java b/src/main/java/com/avaje/ebeaninternal/api/LoadBeanRequest.java
index caeb2ccb3..a3054fcea 100644
--- a/src/main/java/com/avaje/ebeaninternal/api/LoadBeanRequest.java
+++ b/src/main/java/com/avaje/ebeaninternal/api/LoadBeanRequest.java
@@ -8,7 +8,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
/**
* Request for loading ManyToOne and OneToOne relationships.
@@ -96,7 +98,7 @@ public class LoadBeanRequest extends LoadRequest {
*/
public List