copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); manyToOne.addColumn( copy );
copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); manyToOne.addColumn( copy );
/** * @param mutable * @param table * @param fk * @param columnsToBind * @param processedColumns * @param rc * @param propName */ private Property bindManyToOne(String propertyName, boolean mutable, Table table, ForeignKey fk, Set<Column> processedColumns) { ManyToOne value = new ManyToOne((MetadataImplementor)metadata, table); value.setReferencedEntityName( fk.getReferencedEntityName() ); Iterator<Column> columns = fk.getColumnIterator(); while ( columns.hasNext() ) { Column fkcolumn = (Column) columns.next(); checkColumn(fkcolumn); value.addColumn(fkcolumn); processedColumns.add(fkcolumn); } value.setFetchMode(FetchMode.SELECT); return makeEntityProperty(propertyName, mutable, table, fk, value, false); }
/** * @param mutable * @param table * @param fk * @param columnsToBind * @param processedColumns * @param rc * @param propName */ private Property bindManyToOne(String propertyName, boolean mutable, Table table, ForeignKey fk, Set<Column> processedColumns) { ManyToOne value = new ManyToOne(mdbc, table); value.setReferencedEntityName( fk.getReferencedEntityName() ); Iterator<Column> columns = fk.getColumnIterator(); while ( columns.hasNext() ) { Column fkcolumn = (Column) columns.next(); checkColumn(fkcolumn); value.addColumn(fkcolumn); processedColumns.add(fkcolumn); } value.setFetchMode(FetchMode.SELECT); return makeEntityProperty(propertyName, mutable, table, fk, value, false); }
guessAndAlignType(fk.getTable(), fkcolumn, mapping, false); // needed to ensure foreign key columns has same type as the "property" column. element.addColumn(fkcolumn);
guessAndAlignType(fk.getTable(), fkcolumn, mapping, false); // needed to ensure foreign key columns has same type as the "property" column. element.addColumn(fkcolumn);
return null; m2o.addColumn(col);
return null; m2o.addColumn(col);
prop.setValue( manyToOne ); otherSideJoin.get().getKey().getMappedColumns() .forEach( column -> manyToOne.addColumn( ( (Column) column ).clone() ) ); manyToOne.createForeignKey(); mappedByJoin.addProperty( prop );
copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); manyToOne.addColumn( copy );
copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); manyToOne.addColumn( copy );
copy.setComment( column.getComment() ); copy.setDefaultValue( column.getDefaultValue() ); manyToOne.addColumn( copy );