private CQueryCollectionAdd<T> createHelp(OrmQueryRequest<T> request) { if (request.isFindById()) { return null; } else { SpiQuery.Type manyType = request.getQuery().getType(); if (manyType == null) { // subQuery compiled for InQueryExpression return null; } return BeanCollectionHelpFactory.create(manyType, request); } }
private void initialiseAssocMany() { if (!isTransient) { this.help = BeanCollectionHelpFactory.create(this); if (hasJoinTable() || elementCollection) { importedId = createImportedId(this, targetDescriptor, tableJoin); } else { // find the property in the many that matches // back to the master (Order in the OrderDetail bean) childMasterProperty = initChildMasterProperty(); if (childMasterProperty != null) { childMasterProperty.setRelationshipProperty(this); } } if (mapKey != null) { mapKeyProperty = initMapKeyProperty(); } exportedProperties = createExported(); this.sqlHelp = new BeanPropertyAssocManySqlHelp<>(this, exportedProperties); if (exportedProperties.length > 0) { embeddedExportedProperties = exportedProperties[0].isEmbedded(); if (fetchOrderBy != null) { lazyFetchOrderBy = sqlHelp.lazyFetchOrderBy(fetchOrderBy); } } } }
private CQueryCollectionAdd<T> createHelp(OrmQueryRequest<T> request) { if (request.isFindById()) { return null; } else { SpiQuery.Type manyType = request.getQuery().getType(); if (manyType == null) { // subQuery compiled for InQueryExpression return null; } return BeanCollectionHelpFactory.create(manyType, request); } }
private void initialiseAssocMany() { if (!isTransient) { this.help = BeanCollectionHelpFactory.create(this); if (hasJoinTable() || elementCollection) { importedId = createImportedId(this, targetDescriptor, tableJoin); } else { // find the property in the many that matches // back to the master (Order in the OrderDetail bean) childMasterProperty = initChildMasterProperty(); if (childMasterProperty != null) { childMasterProperty.setRelationshipProperty(this); } } if (mapKey != null) { mapKeyProperty = initMapKeyProperty(); } exportedProperties = createExported(); this.sqlHelp = new BeanPropertyAssocManySqlHelp<>(this, exportedProperties); if (exportedProperties.length > 0) { embeddedExportedProperties = exportedProperties[0].isEmbedded(); if (fetchOrderBy != null) { lazyFetchOrderBy = sqlHelp.lazyFetchOrderBy(fetchOrderBy); } } } }