A good ORM to use with qt4 (c++) ? (Django like...)
Does anyone have a recommendation for an开发者_如何学C ORM for qt4 (c++)? (Like a Django ORM).
I would suggest you take a look at the QDjango ORM, it might be just what you are looking for. This C++ ORM only depends on Qt and builds upon Qt's Meta-Object System to provide introspection. On top of the basic create/update/delete operations at the model level, it provides a queryset template class (modeled after django's querysets) which allows to build fairly complex lookups.
Optional QtScript support is also provided, so you can access your models and perform database queries from scripts.
There is also a new open source ORM C++ library : QxOrm. QxOrm is based on QtSql Qt module to communicate with database and boost::serialization to serialize your data with xml and binary format. The web site is in french but quick sample code and tutorial code is in english (a translation is in progress...).
精彩评论