/** * INTERNAL: * Iterates through all one to one mappings and checks if any of them use joining. * <p> * By caching the result query execution in the case where there are no joined * attributes can be improved. */ public void initializeJoinedAttributes() { // For concurrency don't worry about doing this work twice, just make sure // if it happens don't add the same joined attributes twice. List<DatabaseMapping> joinedAttributes = null; List mappings = this.descriptor.getMappings(); for (int i = 0; i < mappings.size(); i++) { DatabaseMapping mapping = (DatabaseMapping)mappings.get(i); if (mapping.isForeignReferenceMapping() && ((ForeignReferenceMapping)mapping).isJoinFetched()) { if (joinedAttributes == null) { joinedAttributes = new ArrayList(); } joinedAttributes.add(mapping); } } this.joinedAttributes = joinedAttributes; }
/** * INTERNAL: * Iterates through all one to one mappings and checks if any of them use joining. * <p> * By caching the result query execution in the case where there are no joined * attributes can be improved. */ public void initializeJoinedAttributes() { // For concurrency don't worry about doing this work twice, just make sure // if it happens don't add the same joined attributes twice. List<DatabaseMapping> joinedAttributes = null; List mappings = this.descriptor.getMappings(); for (int i = 0; i < mappings.size(); i++) { DatabaseMapping mapping = (DatabaseMapping)mappings.get(i); if (mapping.isForeignReferenceMapping() && ((ForeignReferenceMapping)mapping).isJoinFetched()) { if (joinedAttributes == null) { joinedAttributes = new ArrayList(); } joinedAttributes.add(mapping); } } this.joinedAttributes = joinedAttributes; }
/** * INTERNAL: * Iterates through all one to one mappings and checks if any of them use joining. * <p> * By caching the result query execution in the case where there are no joined * attributes can be improved. */ public void initializeJoinedAttributes() { // For concurrency don't worry about doing this work twice, just make sure // if it happens don't add the same joined attributes twice. List<DatabaseMapping> joinedAttributes = null; List mappings = this.descriptor.getMappings(); for (int i = 0; i < mappings.size(); i++) { DatabaseMapping mapping = (DatabaseMapping)mappings.get(i); if (mapping.isForeignReferenceMapping() && ((ForeignReferenceMapping)mapping).isJoinFetched()) { if (joinedAttributes == null) { joinedAttributes = new ArrayList(); } joinedAttributes.add(mapping); } } this.joinedAttributes = joinedAttributes; }
method.addLine(mappingName + ".useBatchReading();"); if (mapping.isJoinFetched()) { if (mapping.isInnerJoinFetched()) { method.addLine(mappingName + ".useInnerJoinFetch();");
method.addLine(mappingName + ".useBatchReading();"); if (mapping.isJoinFetched()) { if (mapping.isInnerJoinFetched()) { method.addLine(mappingName + ".useInnerJoinFetch();");
method.addLine(mappingName + ".useBatchReading();"); if (mapping.isJoinFetched()) { if (mapping.isInnerJoinFetched()) { method.addLine(mappingName + ".useInnerJoinFetch();");