#1 2019-08-16 13:47:24

Vitaly
Member
From: UAE
Registered: 2017-01-31
Posts: 168
Website

CreateAndFillPrepareJoined custom fields

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

#2 2019-08-16 21:50:03

jlc
Member
Registered: 2019-08-15
Posts: 11

Re: CreateAndFillPrepareJoined custom fields

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 big_smile maybe related to the word 'join'?

Last edited by jlc (2019-08-16 21:50:58)

Offline

#3 2019-08-17 12:49:53

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

Re: CreateAndFillPrepareJoined custom fields

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

Board footer

Powered by FluxBB