#1 2022-01-20 18:36:04

larand54
Member
Registered: 2018-12-25
Posts: 96

Join several levels

Trying to  find the best way to solve the problem with tables in multiple levels as the following example:

TSQLLevel0 = TSQLRecord
private
  fName: RawUTF8;
published  
  property name: RawUTF8;
end;
 
TSQLLevel1 = TSQLRecord
private
  fName: RawUTF8;
published  
   property L1Name: RawUTF8;
   property lev0: TSQLLevel0 read fLev0 write fLev0;
end;

TSQLLevel2 = TSQLRecord
private
  fName: RawUTF8;
published  
   property L2Name: RawUTF8;
   property lev1: TSQLLevel1 read fLev1 write fLev1;
end;

Tried with CreateJoined but that could only be used on two levels only i.e. Level0 and level1.
Any suggestions would be appreciated.


Delphi-11, WIN10

Offline

#2 2022-01-20 18:49:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,258
Website

Re: Join several levels

More complex joins are not supported.
The ORM has limitations about the joins for sure.

The idea is to focus on objects, not relations.
Please check the documentation about the aggregate concept, for instance.

Offline

Board footer

Powered by FluxBB