Part of my entitymodel contains this:
tblA --> linkAB <-- tblB --> linkBC <--tblC
I need to create a list containing the properties tblC.P1, tblB.P2 and tblA.P3
I first create a queryX that delivers the necessary linkBC entries that I need. This works.
I thought I could then build a second queryY that would use that output as a way to retrieve the tblA.P3. But I can not seem to get this working.
QueryX:
CategoryPages := aObjManager.Find<TlinkCategoryPage>
.CreateAlias('fPage', 'fp')
.CreateAlias('fCategory', 'fc')
.Add(TExpression.Like( 'fp.PageType', 'Q%' ))
.OrderBy('fc.ftext')
.List;
TlinkCategoryPage has the property Page of TCustomPage.
Query Y:
GroupPage := aObjManager.Find<TlinkGroupPage>
.Add(TExpression.Eq( TProjections.Prop('fPage'), CategoryPages.Page ))
.List;
TlinkGroupPage also has the property Page of TCustomPage.
I seem unable to use TlinkCategoryPage.Page in an expression.
Questions:
a) Is there a way to use objects in an expression ?
b) I might be on the wrong track with this approach: any other approach you would suggest?
Thanx in advance!