//TODO we should check the table too
boolean isOtherSide = false;
mappedBy = "unresolved";
while ( ! isOtherSide && properties.hasNext() ) {
Property manyProperty = (Property) properties.next();
Value manyValue = manyProperty.getValue();
if ( manyValue != null && manyValue instanceof ManyToOne ) {
if ( joinColumns.size() == manyValue.getColumnSpan() ) {
isOtherSide = true;
Iterator it = manyValue.getColumnIterator();
while ( it.hasNext() ) {
Object column = it.next();
if (! joinColumns.contains( column ) ) {
isOtherSide = false;
break;