@Override protected void createBackReferences() { super.createBackReferences(); boolean indexIsFormula = false; Iterator itr = getCollectionBinding().getIndex().getColumnIterator(); while ( itr.hasNext() ) { if ( ( (Selectable) itr.next() ).isFormula() ) { indexIsFormula = true; } } if ( getCollectionBinding().isOneToMany() && !getCollectionBinding().getKey().isNullable() && !getCollectionBinding().isInverse() && !indexIsFormula ) { final String entityName = ( (OneToMany) getCollectionBinding().getElement() ).getReferencedEntityName(); final PersistentClass referenced = getMappingDocument().getMetadataCollector().getEntityBinding( entityName ); final IndexBackref ib = new IndexBackref(); ib.setName( '_' + getCollectionBinding().getOwnerEntityName() + "." + getPluralAttributeSource().getName() + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false ); ib.setCollectionRole( getCollectionBinding().getRole() ); ib.setEntityName( getCollectionBinding().getOwner().getEntityName() ); ib.setValue( getCollectionBinding().getIndex() ); referenced.addProperty( ib ); } } }
private void createIndexBackRef( MappingDocument mappingDocument, IndexedPluralAttributeSource pluralAttributeSource, IndexedCollection collectionBinding) { if ( collectionBinding.isOneToMany() && !collectionBinding.getKey().isNullable() && !collectionBinding.isInverse() ) { final String entityName = ( (OneToMany) collectionBinding.getElement() ).getReferencedEntityName(); final PersistentClass referenced = mappingDocument.getMetadataCollector().getEntityBinding( entityName ); final IndexBackref ib = new IndexBackref(); ib.setName( '_' + collectionBinding.getOwnerEntityName() + "." + pluralAttributeSource.getName() + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false ); ib.setCollectionRole( collectionBinding.getRole() ); ib.setEntityName( collectionBinding.getOwner().getEntityName() ); ib.setValue( collectionBinding.getIndex() ); referenced.addProperty( ib ); } }
PersistentClass referenced = buildingContext.getMetadataCollector().getEntityBinding( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + propertyName + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + propertyName + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + node.attributeValue( "name" ) + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + list.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + list.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + node.attributeValue( "name" ) + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + map.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + map.getOwnerEntityName() + "." + node.attributeValue( "name" ) + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
private void createIndexBackRef( MappingDocument mappingDocument, IndexedPluralAttributeSource pluralAttributeSource, IndexedCollection collectionBinding) { if ( collectionBinding.isOneToMany() && !collectionBinding.getKey().isNullable() && !collectionBinding.isInverse() ) { final String entityName = ( (OneToMany) collectionBinding.getElement() ).getReferencedEntityName(); final PersistentClass referenced = mappingDocument.getMetadataCollector().getEntityBinding( entityName ); final IndexBackref ib = new IndexBackref( metadataBuildingContext ); ib.setName( '_' + collectionBinding.getOwnerEntityName() + "." + pluralAttributeSource.getName() + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false ); ib.setCollectionRole( collectionBinding.getRole() ); ib.setEntityName( collectionBinding.getOwner().getEntityName() ); ib.setValue( collectionBinding.getIndex() ); referenced.addProperty( ib ); } }
PersistentClass referenced = buildingContext.getMetadataCollector().getEntityBinding( entityName ); IndexBackref ib = new IndexBackref( buildingContext ); ib.setName( '_' + propertyName + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
@Override protected void createBackReferences() { super.createBackReferences(); boolean indexIsFormula = false; final List<MappedColumn> mappedColumns = getCollectionBinding().getIndex().getMappedColumns(); for ( MappedColumn mappedColumn : mappedColumns ) { if ( mappedColumn.isFormula() ) { indexIsFormula = true; } } if ( getCollectionBinding().isOneToMany() && !getCollectionBinding().getKey().isNullable() && !getCollectionBinding().isInverse() && !indexIsFormula ) { final String entityName = ( (OneToMany) getCollectionBinding().getElement() ).getReferencedEntityName(); final PersistentClass referenced = getMappingDocument().getMetadataCollector().getEntityBinding( entityName ); final IndexBackref ib = new IndexBackref( metadataBuildingContext ); ib.setName( '_' + getCollectionBinding().getOwnerEntityName() + "." + getPluralAttributeSource().getName() + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false ); ib.setCollectionRole( getCollectionBinding().getRole() ); ib.setEntityName( getCollectionBinding().getOwner().getEntityName() ); ib.setValue( getCollectionBinding().getIndex() ); referenced.addProperty( ib ); } } }
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + propertyName + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + propertyName + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
PersistentClass referenced = mappings.getClass( entityName ); IndexBackref ib = new IndexBackref(); ib.setName( '_' + propertyName + "IndexBackref" ); ib.setUpdateable( false ); ib.setSelectable( false );
ib.setName(UNDERSCORE + property.getName() + "IndexBackref"); ib.setUpdateable(false); ib.setSelectable(false);
ib.setName(UNDERSCORE + property.getName() + "IndexBackref"); ib.setUpdateable(false); ib.setSelectable(false);