You are not logged in.
Pages: 1
There is a method ORMSelectAll in the class TDDDRepositoryRestQuery.
But with this method I can only select records meeting some WHERE-condition. How can I select all records, e.g. like select * from <table>, from a table?
Now I select all records in the following way:
function TPhoMessartCommand.Select: TCQRSResult;
begin
Result := ORMSelectAll('?=?', [1,1]);
end;
Could we have something like? Would this make sense?
function TPhoMessartCommand.Select: TCQRSResult;
begin
Result := ORMSelectAll('*', []);
end;
// or
function TPhoMessartCommand.Select: TCQRSResult;
begin
Result := ORMSelectAll();
end;
Offline
try this?
function TPhoMessartCommand.Select: TCQRSResult;
begin
Result := ORMSelectAll('', []);
end
Offline
try this?
function TPhoMessartCommand.Select: TCQRSResult; begin Result := ORMSelectAll('', []); end
I have already tried it out before, but it didn't work
Offline
There was indeed a weird restriction in TSQLRecord.FillPrepare().
I've ensured that ORMSelectAll('',[]) would return all aggregates, as we should expect.
And included the regression tests.
See http://synopse.info/fossil/info/d358af2109
Note that returning ALL aggregates may not be DDD-aware at all...
The point of the Aggregate is to have all data for a given bounded context.
Retrieving all aggregates may not make sense...
Thanks for the feedback.
Offline
Note that returning ALL aggregates may not be DDD-aware at all...
The point of the Aggregate is to have all data for a given bounded context.
Retrieving all aggregates may not make sense...
It's a good point! I have already refactored some classes ;-) But sometimes I have to retrieve all records from a table for an overview, e.g. in my case I want to let a user gets an overview about all measurement types (TPhoMessart is a measurement type) in the system, so I have to call something like TPhoMessart.SelectAll(out AMessarts: TMessarts);
A further question:
Is it a good idea to use as an aggregate class the same class which maps my messart-table in the database, i.e. TPhoMessart for both as an aggregate and as TSQLRecord class?
Offline
Pages: 1