prepareAndVerify(newDefaultFetchGroup); this.defaultEntityFetchGroup = this.getEntityFetchGroup(newDefaultFetchGroup); } else {
prepareAndVerify(newDefaultFetchGroup); this.defaultEntityFetchGroup = this.getEntityFetchGroup(newDefaultFetchGroup); } else {
while(it.hasNext()) { FetchGroup fetchGroup = it.next(); prepareAndVerify(fetchGroup); getEntityFetchGroup(fetchGroup); prepareAndVerify(this.defaultFetchGroup); this.defaultEntityFetchGroup = getEntityFetchGroup(this.defaultFetchGroup);
while(it.hasNext()) { FetchGroup fetchGroup = it.next(); prepareAndVerify(fetchGroup); getEntityFetchGroup(fetchGroup); prepareAndVerify(this.defaultFetchGroup); this.defaultEntityFetchGroup = getEntityFetchGroup(this.defaultFetchGroup);
/** * INTERNAL: * Add mandatory attributes to fetch group, create entityFetchGroup. */ public void prepareFetchGroup() throws QueryException { FetchGroupManager fetchGroupManager = this.descriptor.getFetchGroupManager(); if (fetchGroupManager != null) { if (this.fetchGroup == null) { if (this.fetchGroupName != null) { this.fetchGroup = fetchGroupManager.getFetchGroup(this.fetchGroupName); } else if (this.shouldUseDefaultFetchGroup) { this.fetchGroup = this.descriptor.getFetchGroupManager().getDefaultFetchGroup(); } } if (this.fetchGroup != null) { if (hasPartialAttributeExpressions()) { //fetch group does not work with partial attribute reading throw QueryException.fetchGroupNotSupportOnPartialAttributeReading(); } // currently SOP is incompatible with fetch groups setShouldUseSerializedObjectPolicy(false); this.descriptor.getFetchGroupManager().prepareAndVerify(this.fetchGroup); } } else { // FetchGroupManager is null if (this.fetchGroup != null || this.fetchGroupName != null) { throw QueryException.fetchGroupValidOnlyIfFetchGroupManagerInDescriptor(getDescriptor().getJavaClassName(), getName()); } } }
this.descriptor.getFetchGroupManager().prepareAndVerify(this.fetchGroup);