private void InitializeAssociationAttribute(bool isEnumerableType, AbstractAssociationAttribute association) { isManyToOne = association.isForeignKey; if (isEnumerableType) { if (isManyToOne) { throw new MappingException("Foreign Key member type should be entity class not collection type."); } relatedEntityType = ReflectionHelper.GetElementType(memberType); } else { relatedEntityType = memberType; } thisKey = association.ThisKey; otherKey = association.OtherKey; if (relatedEntityType == entity.entityType) { relatedEntity = entity; } }
private void InitializeAssociationAttribute(bool isEnumerableType, AbstractAssociationAttribute association) { isManyToOne = association.isForeignKey; if (isEnumerableType) { if (isManyToOne) throw new MappingException("Foreign Key member type should be entity class not collection type."); relatedEntityType = ReflectionHelper.GetElementType(memberType); } else { relatedEntityType = memberType; } thisKey = association.ThisKey; otherKey = association.OtherKey; if (relatedEntityType == entity.entityType) relatedEntity = entity; }