Hi there,
I have a custom template and I'm looping through Many To One RelatedEntities but can't figure out how to access the FKey field of the currentEntity that represents the relation.
Here's the entity template code:
<[Foreach RelatedEntity ManyToOne]><[If Not MappedFieldRelationIsHidden]>
<[RelatedEntityName]> f<[MappedFieldNameRelation]>;
[Association("<[RelatedMappedFieldNameRelation]>-<[RelatedEntityName]>-<[CurrentEntityName]>")]
[Persistent("<[RelatedEntityFieldName]>")]
public <[RelatedEntityName]> <[MappedFieldNameRelation]>
{
get { return f<[MappedFieldNameRelation]>; }
set { SetPropertyValue<<[RelatedEntityName]>>("<[MappedFieldNameRelation]>", ref f<[MappedFieldNameRelation]>, value); }
}<[EndIf]><[NextForeach]>
Example code of what I need:
public ContactEntity
{
public int cTypeID;
[Persistent("cTypeID")]
public CType ContactType;
}
Using Template Studio: 2.6.06102008 Final