Skip to content

Commit

Permalink
reintroduced TDDDRepositoryRestFactory.GetAggregateRTTIOptions virtua…
Browse files Browse the repository at this point in the history
…l method

- deleted by error in latest commit
  • Loading branch information
Arnaud Bouchez committed Mar 12, 2019
1 parent fb0779c commit cd9d6e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions SQLite3/mORMotDDD.pas
Expand Up @@ -493,6 +493,7 @@ TDDDRepositoryRestFactory = class(TInterfaceResolverForSingleInterface)
procedure TablePropToAggregate(
aRecord: TSQLRecord; aRecordProp: TSQLPropInfo;
aAggregate: TObject; aAggregateProp: TSQLPropInfo); virtual;
function GetAggregateRTTIOptions: TSQLPropInfoListOptions; virtual;
// main IoC/DI method, returning a TDDDRepositoryRest instance
function CreateInstance: TInterfacedObject; override;
public
Expand Down Expand Up @@ -1292,8 +1293,7 @@ constructor TDDDRepositoryRestFactory.Create(
fPropsMapping.Init(aTable,RawUTF8(aAggregate.ClassName),aRest,false);
fPropsMapping.MapFields(['ID','####']); // no ID/RowID for our aggregates
fPropsMapping.MapFields(TableAggregatePairs);
fAggregateRTTI := TSQLPropInfoList.Create(aAggregate,
[pilAllowIDFields,pilSubClassesFlattening,pilIgnoreIfGetter]);
fAggregateRTTI := TSQLPropInfoList.Create(aAggregate, GetAggregateRTTIOptions);
SetLength(fAggregateToTable,fAggregateRTTI.Count);
SetLength(fAggregateProp,fAggregateRTTI.Count);
ComputeMapping;
Expand All @@ -1311,6 +1311,11 @@ constructor TDDDRepositoryRestFactory.Create(const aInterface: TGUID;
Create(aInterface,aImplementation,aAggregate,aRest,aTable,[],aOwner);
end;

function TDDDRepositoryRestFactory.GetAggregateRTTIOptions: TSQLPropInfoListOptions;
begin
Result := [pilAllowIDFields,pilSubClassesFlattening,pilIgnoreIfGetter];
end;

destructor TDDDRepositoryRestFactory.Destroy;
begin
{$ifdef WITHLOG}
Expand Down
2 changes: 1 addition & 1 deletion SynopseCommit.inc
@@ -1 +1 @@
'1.18.5097'
'1.18.5098'

0 comments on commit cd9d6e4

Please sign in to comment.