if ( columns != null ) { for ( int i = 0; i < columns.length; i++ ) { addConstraintToColumn( columns[i] ); addConstraintToColumn( buildingContext.getMetadataCollector() .getLogicalColumnName( table, column.getMappingColumn().getQuotedName() )
public void doSecondPass(Map persistentClasses) throws MappingException { if ( columns != null ) { for (String columnName : columns) { addConstraintToColumn( columnName ); } } if ( column != null ) { this.table = column.getTable(); addConstraintToColumn( mappings.getLogicalColumnName( column.getMappingColumn().getQuotedName(), table ) ); } }
@Override public void doSecondPass(Map persistentClasses) throws MappingException { if ( columns != null ) { for ( int i = 0; i < columns.length; i++ ) { addConstraintToColumn( columns[i] ); } } if ( column != null ) { this.table = column.getTable(); final PropertyHolder propertyHolder = column.getPropertyHolder(); String entityName = ( propertyHolder.isComponent() ) ? propertyHolder.getPersistentClass().getEntityName() : propertyHolder.getEntityName(); final PersistentClass persistentClass = (PersistentClass) persistentClasses.get( entityName ); final Property property = persistentClass.getProperty( column.getPropertyName() ); if ( property.getValue() instanceof Component ) { final Component component = (Component) property.getValue(); final List<Column> columns = component.getMappedColumns().stream() .filter( Column.class::isInstance ) .map(Column.class::cast ) .collect( Collectors.toList() ); addConstraintToColumns( columns ); } else { addConstraintToColumn( column.getMappingColumn().getQuotedName() ) ; } } }
public void doSecondPass(Map persistentClasses) throws MappingException { if ( columns != null ) { for (String columnName : columns) { addConstraintToColumn( columnName ); } } if ( column != null ) { this.table = column.getTable(); addConstraintToColumn( mappings.getLogicalColumnName( column.getMappingColumn().getQuotedName(), table ) ); } }
public void doSecondPass(Map persistentClasses) throws MappingException { if ( columns != null ) { for (String columnName : columns) { addConstraintToColumn( columnName ); } } if ( column != null ) { this.table = column.getTable(); addConstraintToColumn( mappings.getLogicalColumnName( column.getMappingColumn().getQuotedName(), table ) ); } }