Hello,
I have such test tables:
Which is the fastest query to get all TTag items for TRec?
Maybe this is possible to write some helper to get this "out the box"?
Hello,
var
Rec: TRec; // this is selected record
RecTagList: TList<TRecTag>;
RecTag: TRecTag;
TagList: TList<TTag>; // I need this list
...
RecTagList := ObjManager.Find<TRecTag>
.CreateAlias('RecId', 'Rec')
.Where(Linq['Rec.Id'] = Rec.RecId)
.List;
for RecTag in RecTagList do
TagList.Add(RecTag.TagId);
Also how to use Linq with TGUID? If indexes will have TGUID type.
That's a good approach for TRec and TTag, yes.
Linq['Rec.id'] = GuidToString(Rec.RecId.Id)