You are not logged in.
Pages: 1
Is there any way to form a joined table with custom fields?
Like aCustomFieldsCSV parameter in CreateAndFillPrepare works.
I tried to search, but couldn't find any topic, mentioning CreateAndFillPrepareJoined. I am afraid something is wrong with the search on the forum...
Offline
It's strange, even github doesn't find anything: https://github.com/synopse/mORMot/searc … pareJoined
But I don't think you can define it, all code examples in docu shows that it will get *
One example I used:
fRecord := TSQLMyRecord.CreateAndFillPrepareJoined(DBCon, '(InfoList.Name = ? OR Task.Name = ?) AND timestamp > date(?, ?)', [], [InfoName, TaskName, 'now', Period]);
try
while fRecord.FillOne do
begin
...
end;
finally
fRecord.Free;
end;
EDIT: the forum search doesn't find this thread maybe related to the word 'join'?
Last edited by jlc (2019-08-16 21:50:58)
Offline
You are right: TSQLRecord.CreateAndFillPrepareJoined doesn't support custom fields names to retrieve.
This would have made the ORM code even more complicated, and benefit wouldn't be huge in terms of performance, so we didn't push up to that with joined records.
Offline
Pages: 1