TMS Aurelius can create tables using schemas in postgres?

Hello everyone, I need to create tables in a postgres schema, I write the entity in Delphi and when I want to update the database structure with Aurelius I have an error.

In postgres:

create database mibase;
create schema adm;

In Delphi:

[Entity,Automapping]
  [Table('adm.apps')]
  TApps=class
  private
    FId: integer;

    [Column('nombre', [TColumnProp.Required], 64)]
    Fnombre: string;

  public
    property Id: integer read FId write FId;
    property Nombre:string read Fnombre write Fnombre;
  end;

When I execute
TDatabaseManager.Update(Fconnection);

returns the error:
"......with message '[FireDAC][Phys][PG][libpg] Error: syntax error at or near "."

When I remove the schema prefix (adm.) everything works but it is created in the public schema
Thank you for your help
Atte.
Harwin Edil

The schema should be provided as a second parameter in Table attribute:

 [Table('apps', 'adm')]

Thank you very much Wagner!
Atte
A follower
Harwin

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.