omar wrote:
Thanx for the link.
the TDL loop <[Foreach RelatedEntity OneToMany]> is translated in lpt to this loop
<%
For Each relation As EntityRelation In currentEntity.Relations
If relation.RelationType <> EntityRelationType.OneToMany Then
Continue For
End If
Next
%>
but what is the lpt counterpart of TDL's <[If Not MappedFieldRelationIsHidden]>
The trick is to peek into the TDLInterpreter sourcecode .
The interpret methods are named after the statement they handle, so it's pretty easy to find the code (single statement handler handles single TDL statements).
So you should peek into HandleIfMappedFieldRelationIsHiddenStart. There you'll see that it checks the current relation's UtilizingPropertyIsHidden property. The field mapped onto a relation is called internally the 'utilizing property', hence the name
Also pay attention to the flag which signals if a relation is used for inheritance ('IsUsedForHierarchy), you should exclude these as well.