#1 2015-10-30 20:54:36

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

Naming the classes

Hi,

when a class needs to be mapped to the database does it have to start with TSQL or is it enough to be a TSqlRecord descendant?

Leslie

Offline

#2 2015-11-01 09:22:12

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

Re: Naming the classes

Never tried 'Tsql', but you can just try it ('CreateMisingTables') and see the result immediately.


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

Offline

#3 2015-11-01 19:21:50

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

Re: Naming the classes

Thanks

Offline

#4 2015-11-02 07:29:45

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

Re: Naming the classes

The ORM would trim TSQLRecord, TSQL or even just T.

So you can use TMyRecord, which will create a MyRecord table.

By convention, we usually define TSQL* classes to easily identify TSQLRecord inherited classes.

Online

Board footer

Powered by FluxBB