You are not logged in.
Pages: 1
Hi,
I'm evaluating the mORMot framework for a new project of mine.
I use firebird as database server for many years and I would use it with the mORMot framework, but I encountered a problem. I ever used dialect 3 on firebird and double quoted field names.
I adapted the 04 - HTTP Client-Server sample to access a firebird database but CreateMissingTables fails because the field named Time is in conflict with firebird time field type. I don't find a place where instruct the framework to produce sql statements with field names enclosed in double quotes.
How could it be achieved?
Thanks in advance
Carlo
Offline
I managed to get around the problem mapping the time field to "Time".
Tabe was successfully created.
This is the code
Model.Props[TSQLSampleRecord].ExternalDB.MapField('Time', '"Time"');
Is this the only available way to do this or I can define a flag in the framework to tell it to quote field names?
Thanks.
Carlo
Offline
Those dialects are quite a mess...
I tried to implement rpmQuoteFieldName new mapping option, which does the MapField() call for all fields.
See https://synopse.info/fossil/info/582c350655
Feedback is welcome! Especially I am not sure if it works fully with the ID field...
Offline
Those dialects are quite a mess...
I tried to implement rpmQuoteFieldName new mapping option, which does the MapField() call for all fields.
See https://synopse.info/fossil/info/582c350655
Feedback is welcome! Especially I am not sure if it works fully with the ID field...
Thanks ab,
I'll try it.
In the mean time I do other tests with the framework: new problem! The first time the server is started and CreateMissingTables is called, all goes fine, the table is created, but next time the server starts it tries to update the table adding an index that already exists. Why? Where I'm wrong?
Offline
I also noticed on the same Sample project, after applyed quoted field names option on the server side, an error (field not found) is raised when on the client side is made a search of a previously inserted message.
Field names are not quoted on building the sql statement!
Offline
Pages: 1