public ColumnModel entityField ( String entityFieldName ) { DialectException . assureNotEmpty ( entityFieldName , "entityFieldName can not be empty" ) ; this . entityField = entityFieldName ; if ( this . tableModel != null ) { List < ColumnModel > oldColumns = this . tableModel . getColumns ( ) ; Iterator < ColumnModel > columnIter = oldColumns . iterator ( ) ; while ( columnIter . hasNext ( ) ) { ColumnModel column = columnIter . next ( ) ; if ( entityFieldName . equals ( column . getEntityField ( ) ) && ! this . getColumnName ( ) . equals ( column . getColumnName ( ) ) ) columnIter . remove ( ) ; } } return this ; }
Mark this column map to a Java entity field if exist other columns map to this field delete other columns . This method only designed for ORM tool