Multi column primary index

Forum for posting problems using QxOrm library

Multi column primary index

Postby ruddy32 » Mon Jan 03, 2011 10:19 am

Hi,
How to declare primary index based on 2 columns using QX_REGISTER_PRIMARY_KEY macro ?
Thanks
ruddy32
 

Re: Multi column primary index

Postby QxOrm admin » Tue Jan 04, 2011 11:21 am

Hi,

With the macro QX_REGISTER_PRIMARY_KEY, you can change the default type of primary key : by default QxOrm uses a 'long' type.
To use a primary key based on 2 columns, you can define a pair type : "std::pair<T1, T2>", or "QPair<T1, T2>", or a tuple : "boost::tuple<T1, T2, T3, etc...>".
QxOrm admin
 

Re: Multi column primary index

Postby QxOrm admin » Wed Jan 05, 2011 8:09 am

Sorry for my last answer, I think it shoudn't work with macro QX_REGISTER_PRIMARY_KEY.
Multi column primary index is not a feature provided by QxOrm 1.1.3.
Perhaps in QxOrm 1.1.4...
QxOrm admin
 

Re: Multi column primary index

Postby ruddy32 » Sat Jan 08, 2011 11:45 am

Is there some development started yet?
ruddy32
 

Re: Multi column primary index

Postby QxOrm admin » Sat Jan 08, 2011 1:49 pm

I have written a new kind of smart pointer : qx::dao::ptr<T> based on QSharedPointer (Qt smart pointer).
This new smart pointer provides 2 new features :
1- a "isDirty()" method to know if an instance has been modified. You can also retrieve all properties changed.
2- "update optimized" to update in database only fields changed

Also, QxOrm 1.1.4 will support 3 strategies of inheritance :
1- Single Table Inheritance
2- Class Table Inheritance
3- Concrete Table Inheritance

Today, QxOrm 1.1.3 supports only "Concrete Table Inheritance" strategy.

This will be the new features provided by QxOrm 1.1.4...
I think this new version will be released current january...
QxOrm admin
 

Re: Multi column primary index

Postby ruddy32 » Sat Jan 08, 2011 3:57 pm

Does it means that multi-colomn index will be supported in 1.1.4 ? Both index and relations ? :-)
I available for testing. Let me know.
ruddy32
 

Re: Multi column primary index

Postby QxOrm admin » Sun Jan 16, 2011 1:44 pm

Thanks, I just release a new version : QxOrm 1.1.4.
You can test it if you want... ;)
QxOrm admin
 


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 11 guests