You are not logged in.
Pages: 1
Hi!
I have a database table with only two columns, they are a compound key, but I don't have any ID column as a primary key. If I execute CreateMissingTables I get an exception EMySQLNativeException [AnyDAC][Phys][MySQL] "Unknown column ID in field list".
VirtualTableExternalRegister(FSQLModel, TMyDatabaseTableExt, FSQLConnectionProperties, 'MyDatabaseTable');
FRestServer.CreateMissingTables();
How can I handle this? Thank you for your help!
Offline
The ORM expects an INTEGER primary key.
By default, it is named "ID", but you can use any other name (e.g. "Key" or "Ident") in the external table.
It does not support compound key.
See http://synopse.info/files/html/Synopse% … l#MNDX_317
This is a restriction due to SQLite3, which we use as kernel.
So you NEED at least an integer primary key, even if you use other fields as primary key in your code.
Offline
Ok, thanks!
Offline
Pages: 1