#1 2015-10-29 17:21:27

Leslie7
Member
Registered: 2015-06-25
Posts: 248

Model From Database

Hi,

I am  trying to share an existing firebird db via mORMot to mobile clients. is there any automated way to create the model from database?

Leslie

Offline

#2 2015-10-30 07:37:56

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: Model From Database

I don't think it's possible with the current version of mORMot. mORMot can automatically create and update database schema from the TSQL-prefixed class models, but not the other way around.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#3 2015-10-30 08:45:59

Leslie7
Member
Registered: 2015-06-25
Posts: 248

Re: Model From Database

Thanks

Offline

#4 2015-10-30 08:49:36

emaxx
Member
Registered: 2014-07-03
Posts: 18

Re: Model From Database

ab has written a sample doing this, have a look at "Samples/12 - SynDB Explorer"  --> Button Query Builder --> Button To Object --> To One TSQLRecord per table. This should help as an entry point.

Offline

#5 2015-10-30 09:10:15

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

Offline

Board footer

Powered by FluxBB