You are not logged in.
Pages: 1
Can you show a example? It's a property, I can't override it.
Is there a method that is called after a record be Updated?
ask for a copied/sharded property name of a detail record to be automatically updated if the main property name is changed.
How can I do it? Is there a command to do it, like a trigger, every time some user alters the unit table the UnitName in the product table is updated?
Hello,
I have 2 tables, on the first table I have a Integer field that relates with the second table. I need that the ORM goto the second table get a text field( of the corresponding row that indicates on the ID of the first table) and show togheter in the same select (same TSQLRecord).
A example of what I'm talking about:
TUnit = class(TSQLRecord)
private
FName: RawUTF8;
published
property Name: RawUTF8 read FName write FName;
end;
TProduct = class(TSQLRecord)
private
....
FIDUnit: TUnit;
published
....
property IDUnit: TUnit read FIDUnit write FIDUnit;
end;
In this case when I retrieve a TProduct the TUnit.Name has to come together with this record. How should I proceed?
I believe that when you declare a class with a relationship (TSQLRecord kind of field), the should create the correspondent Foreign key, there would be a default option (cascade or restricted).
What do you think?
Very well, thanks for all the answers.
I will use TSQLRecord.InitializeTable() method.
I need to create the Foreign Keys by hand.
Is there a command on the ORM to create Foreign Keys?
If not, Wich Administration tool to SQlite you think is better to the Database created by the ORM, for me to do that?
Internal how? If I try to delete a record used by another table the ORM won't let me?
Hi...
I was seen the Database created by the ORM, and in the Database Properties -> Collation List there is a [SYSTEMNOCASE] as one of its values.
What does [SYSTEMNOCASE] means?
Hello...
How can I declare a TSQLRecord in a way to make the ORM create a Foreign Key into a SQlite database?
I have declare 2 classes:
TEndereco = class(TSQLRecord)
private
FLogradouro: RawUTF8;
FBairro: RawUTF8;
FNumero: Integer;
FCidade: RawUTF8;
published
property Logradouro: RawUTF8 read FLogradouro write FLogradouro;
property Numero: Integer read FNumero write FNumero;
property Bairro: RawUTF8 read FBairro write FBairro;
property Cidade: RawUTF8 read FCidade write FCidade;
end;
TCliente = class(TSQLRecord)
private
FDivida: Currency;
FDataAlteracao: TModTime;
FIdade: Integer;
FNome: RawUTF8;
FDataNascimento: TDateTime;
FCNPJ: RawUTF8;
FEndereco: TEndereco;
published
property Nome: RawUTF8 read FNome write FNome;
property Idade: Integer read FIdade write FIdade;
property DataAlteracao: TModTime read FDataAlteracao write FDataAlteracao;
property Divida: Currency read FDivida write FDivida;
property DataNascimento: TDateTime read FDataNascimento
write FDataNascimento;
property CNPJ: RawUTF8 read FCNPJ write FCNPJ;
property Endereco : TEndereco read FEndereco write FEndereco;
end;
The ORM created 2 tables and a Endereco Integer field to make the relationship, but do not create a Foreign Key between the 2 tables.
Perfect, I'm will wait for it.
It would very nice if you developed a example using this unit, when you release SynDBFirebird.pas.
What do you think?
Ok, do you think until June/2013 this unit will be work fine?
I downloaded the last version, but the problem persist.
What does CreateMissingTables do?
On the Firebird database already exists a table CLIENT that I created and insert some records in it.I'm just trying to acess this Table and retrive one of those records.
Ok, I add the code
Server.CreateMissingTables(0);
It says the table already exists. What can be the cause of this error?
I'm trying to emulate it, but some how doesn't work.
var
Props: TSQLDBFirebirdConnectionClientProperties;
Server : TSQLRestServerDB;
Cli : TClient;
CliModel : TSQLModel;
Client : TSQLRestClientDB;
begin
Props := TSQLDBFirebirdConnectionClientProperties.Create('localhost:X:\MORMOT\ORM\TEST.fdb', 'TEST.fdb', 'SYSDBA', 'masterkey');
CliModel := TSQLModel.Create([TCliente], 'root');
VirtualTableExternalRegister(CliModel, TClient, Props, 'CLIENT');
Server := TSQLRestServerDB.Create(CliModel, 'application.db');
Cli :=TClient.CreateAndFillPrepare(Server, 'ID=?', [1]);
It says theres no such table, but in the database the table is all normal. What am I doing wrong?
Where in the SAD documentation can I find It? Is there any example for guide me?
OK, but how can I acess Fiberbird withou using TSQLDBStatement / TSQLDBConnection, and only using TSQLRestServerDB?
Hi,
I'm new with your ORM, while reading the SAD documentation. I don't understand how to get a TSQLRecord.CreateAndFillPrepare.
Connect to the database and use a TSQLDBStatement is all right.
But what class do I have to use to connect into the TSQLDBConnection and the TSQLRecord(if that is possible)?
How can I retrieve a record from the database to a TSQLRecord inherited class? Do I have to use TSQLRestServerDB?
It works!!!
Thank you
Hi,
How can I change the User and Password for connect into the server? I'm using TSQLRestServerFullMemory in Interfaced Based Services, and for all I know
the user table stay in memory, right? How can add and remove users ?
Hi, I have a class with 71 propertys and fields.
I'm getting this error : "TPerson has too many fields".
Why there is a field quantity limitation? How can I handle It?
Hi,
AB, How many objects do you recomend to send using one TObjectList??
I would like to know what you guys think about dwsDatabase?
http://delphitools.info/2013/01/23/intr … sdatabase/
It says that works with mORMot SynDB and Universal InterBase.
Does It woks with Interfaced Based Services and TObjectList?
Hi, is there a away to turn a class retrieved from the database into a record on a ClientDataSet?
Good!!!
I'm will wait for it.
Hello,
Is there a way to use dbexpress or devart to connect into a database and still use your ORM?
If no, how can I acess a Firebird database other than ODBC?
Pages: 1