How to use set column unique?

Forum for posting problems using QxOrm library

How to use set column unique?

Postby staszek_dev » Wed Mar 16, 2016 8:27 am

Hi,
I want to set my column as an unique. I call function setIsUnique() but it dosen`t work.

Code: Select all
t.data( & AMSJobEntity::m_strName, "name" )->setIsUnique( true );


How can I do this?

Similar setDefaultValue() function doesn`t work.
staszek_dev
 
Posts: 4
Joined: Thu Feb 04, 2016 4:02 pm

Re: How to use set column unique?

Postby qxorm » Wed Mar 16, 2016 4:36 pm

Hello,

setIsUnique(), setDefaultValue() ... doesn`t work

What do you mean with "doesn`t work" ?

If you mean : these parameters are not used to generate database schema, yes this is normal.
These 2 functions are just meta-data of your class/property for the introspection engine of QxOrm library.
And they are not used.

About schema generation, there is a section in QxOrm manual here : http://www.qxorm.com/qxorm_en/manual.html#manual_470
It is recommended to use QxEntityEditor or another tool dedicated to your SGBD to manage your database schema.
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 15 guests