@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 ); } } }
holder.prepare( property ); PersistentClass owner = mapValue.getOwner(); AccessType accessType;
ib.setSelectable( false ); ib.setCollectionRole( map.getRole() ); ib.setEntityName( map.getOwner().getEntityName() ); ib.setValue( map.getIndex() );
PersistentClass owner = mapValue.getOwner(); boolean isPropertyAnnotated;
ib.setSelectable( false ); ib.setCollectionRole( map.getRole() ); ib.setEntityName( map.getOwner().getEntityName() ); ib.setValue( map.getIndex() );
PersistentClass owner = mapValue.getOwner(); boolean isPropertyAnnotated;
@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 owner = mapValue.getOwner(); boolean isPropertyAnnotated;
PersistentClass owner = mapValue.getOwner(); boolean isPropertyAnnotated;
holder.prepare( property ); final PersistentClass owner = mapValue.getOwner(); AccessType accessType;