protected void linkBidirectionalOneToMany ( Collection collection , PersistentClass associatedClass , DependantValue key , PersistentProperty otherSide ) { collection . setInverse ( true ) ; // Iterator mappedByColumns = associatedClass.getProperty(otherSide.getName()).getValue().getColumnIterator(); Iterator < ? > mappedByColumns = getProperty ( associatedClass , otherSide . getName ( ) ) . getValue ( ) . getColumnIterator ( ) ; while ( mappedByColumns . hasNext ( ) ) { Column column = ( Column ) mappedByColumns . next ( ) ; linkValueUsingAColumnCopy ( otherSide , column , key ) ; } }
Links a bidirectional one - to - many configuring the inverse side and using a column copy to perform the link