#1 2024-02-21 21:04:03

mrbar2000
Member
From: Brazil
Registered: 2016-10-26
Posts: 90

TormMany with diferent source and dest fieldnames

I have this class.

  TContatos = class(TOrmMany)
  private
    FSource: TPessoa;
    FDest: TContato;
  published
    property Source: TPessoa read FSource;
    property Dest: TContato read FDest;
  end;

mormot create table with: id, source, dest
How to do mormot create the table with:
id, pessoa, contato?
or
id , pessoaid, contatoid?

Offline

#2 2024-02-22 08:33:12

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

Re: TormMany with diferent source and dest fieldnames

Source/Dest fields could not be renamed as such internally.
You can define the database as external, then rename the Source/Dest fields in the database mapping.

Offline

Board footer

Powered by FluxBB