public String getJoinColumnName(final KunderaMetadata kunderaMetadata)
    {
                
        if(joinColumnName == null && isJoinedByPrimaryKey)
        {
            EntityMetadata joinClassMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, targetEntity);
            joinColumnName  = ((AbstractAttribute)joinClassMetadata.getIdAttribute()).getJPAColumnName();
        }
        
        if(joinTableMetadata != null)
        {
            joinColumnName = joinTableMetadata.getJoinColumns() != null? joinTableMetadata.getJoinColumns().iterator().next():null;
        }
        
        if(isBiDirectional())
        {
            // Give precedence to join column name!
            if(biDirectionalField.isAnnotationPresent(JoinColumn.class))
            {
                joinColumnName = biDirectionalField.getAnnotation(JoinColumn.class).name();
            }
        }
        
        return joinColumnName !=null? joinColumnName:property.getName();
    }
public String getJoinColumnName ( final KunderaMetadata kunderaMetadata ) { if ( joinColumnName == null && isJoinedByPrimaryKey ) { EntityMetadata joinClassMetadata = KunderaMetadataManager . getEntityMetadata ( kunderaMetadata , targetEntity ) ; joinColumnName = ( ( AbstractAttribute ) joinClassMetadata . getIdAttribute ( ) ) . getJPAColumnName ( ) ; } if ( joinTableMetadata != null ) { joinColumnName = joinTableMetadata . getJoinColumns ( ) != null ? joinTableMetadata . getJoinColumns ( ) . iterator ( ) . next ( ) : null ; } if ( isBiDirectional ( ) ) { if ( biDirectionalField . isAnnotationPresent ( JoinColumn . class ) ) { joinColumnName = biDirectionalField . getAnnotation ( JoinColumn . class ) . name ( ) ; } } return joinColumnName != null ? joinColumnName : property . getName ( ) ; }
Gets the join column name.

@return the joinColumnName