QxOrm est une bibliothèque C++ open source de gestion de données (Object Relational Mapping).
QxEntityEditor est un éditeur graphique pour la bibliothèque QxOrm : QxEntityEditor permet de gérer graphiquement le modèle d'entités.

La version courante de la bibliothèque QxOrm est la version 1.4.7 :

Historique des modifications de la bibliothèque QxOrm :

Changes in version 1.4.7:
- Fix a MongoDB issue with qx::dao::fetch_by_id_with_relation() (wrong id fetched)
- Fix an issue with qx::dao::fetch_all when a custom list of columns with the primary key is used
- Fix identifier JSON serialization for MongoDB with properties registered as Q_PROPERTY (Qt property meta system)
- Fix a crash (seg fault) using qx::IxPersistable with multiple inheritance (for example QObject + qx::IxPersistable) due to some static_cast to void * in QxFactory module (fix also for QxService module and multiple inheritance)
- Remove automatic relationship lazy fetch when not requested in query
- Fix an issue with QJson and QDataStream serialization when class doesn't contain any identifier (so not a database class) and is a wrapper of another registered class (can have same address pointer as parent)
- Improve qx::QxSqlQuery::freeText() method to add custom text to build SQL query : support placeholders (add second parameter const QVariantList & values)
- Improve performance in a multi-threads environment (mutex in qx::IxSqlQueryBuilder)
- New setting to display more details (execution times) in qx::dao functions logs (to enable this new feature : qx::QxSqlDatabase::getSingleton()->setDisplayTimerDetails(true))
- Improve MongoDB integration to fetch a list of items : build C++ instances as soon as possible without putting data in a buffer (better performance + less memory usage)
- Improve MongoDB integration : support qx::dao::delete_by_query() function with MongoDB aggregation framework
- Improve qx::QxSqlQuery class (or its qx_query alias) : new addJoinQuery() method to insert SQL sub-queries inside LEFT OUT JOIN / INNER JOIN (more details in documentation here :
- Improve qx::QxSqlQuery class : new constructors with placeholders support + new methods to embed SQL sub-queries (in_Select, notIn_Select, isEqualTo_Select, isNotEqualTo_Select)
- Improve qx::QxCollection class : qx::QxCollection is now a thread-safe container (fix for example QxModelView module when model is fetched in a different thread than the view)

Changes in version 1.4.6:
- New QxHttpServer module : C++/Qt standalone multi-threaded HTTP 1.1 web server (support SSL/TLS, persistent connections, cookies, sessions, chunked responses, URL dispatcher/routing, no other dependency except QtNetwork) :
- New QxRestApi module : provide a REST API to send requests in JSON format from external application (web services), from web-site (written in Angular for example), from QML or from scripting langage (like Python) :
- With QxHttpServer and QxRestApi modules, QxOrm library can now be used to create web applications, especially single-page applications (SPA) with famous Javascript frameworks like AngularJS, React, Meteor.js, etc...
- New project example named qxBlogRestApi : QML application with a list of REST requests to show how to send JSON queries from Javascript to QxRestApi module + HTTP web server application to show how to create web applications using QxHttpServer module
- QxRestApi module supports : all CRUD operations, complex queries, several levels of relationships, custom JSON output format, call dynamically native C++ functions registered in QxOrm context, instance validation, call custom database queries
- Improve JSON serialization engine : possibility to define a custom filter to not export all properties (
- Possibility to define a custom SQL table alias for complex queries with relationships using syntax <my_table_alias> (
- Improve SQL generator for Oracle database : manage last insert id using RETURNING INTO syntax (thx to Romain Macureau and Abdennour Boutrig)
- Fix an issue with stored procedure and output parameters
- New function available : qx::dao::count_with_relation<T>()
- Fix JSON serialization in multi-thread environment
- Change JSON QDateTime and QTime serialization format : use Qt::ISODateWithMs instead of Qt::ISODate (Qt 5.8 or +)
- Improve QxService module : support SSL/TLS secure connections + keep-alive connections
- Remove *.suo files (MSVC++ temporary project files) from QxOrm package

Changes in version 1.4.5:
- Support MongoDB database : QxOrm library becomes a C++/Qt Object Document Mapper ODM library !
- For more details about MongoDB integration, see QxOrm manual ( and new sample project available in ./test/qxBlogMongoDB/ directory
- QxOrm library is now available on GitHub (official repository) :
- Fix an issue in qx::IxSqlQueryBuilder class when QxOrm library is used in a multi-thread environment
- Support latest version of boost (1.66)
- Update boost portable binary serialization classes to version 5.1 (provided by
- Fix an issue building SQL query for Oracle database (doesn't support AS keyword for table alias)
- Improve qx::QxClassX::registerAllClasses() function : possibility to initialize all relations (useful to work with introspection engine)
- Improve qx::IxPersistable interface : provide new methods toJson() / fromJson()
- Improve documentation/website : change by everywhere
- Fix fetching relations with soft delete putting SQL condition in the JOIN part instead of WHERE part
- Fix SQL generator for Oracle database : use new limit/pagination syntax (version Oracle > 12.1)
- Improve SQL generator interface : add 'onBeforeSqlPrepare()' method to modify/log SQL queries in custom classes
- Add an option in qx::QxSqlDatabase class to format SQL query (pretty-printing) before logging it (can be customized creating a qx::dao::detail::IxSqlGenerator sub-class)
- Fix an issue with boost/std::optional (to manage NULL database values) and some databases : if optional is empty, then create a NULL QVariant based on QVariant::Type
- Add an option in qx::QxSqlDatabase class to insert square brackets (or any other delimiters) in SQL queries for table name and/or column name (to support specific database keywords)
- Improve introspection engine : add getType() method in qx::IxDataMember interface to get C++ type of a property dynamically
- Improve qx::QxSqlDatabase singleton settings class to make easier working with several databases : now there are 3 levels of settings : global >> per thread >> per database (see 'bJustForCurrentThread' and 'pJustForThisDatabase' optional parameters in all setXXXX() methods)
- Fix QxOrm.pri for MinGW compiler on Windows : an issue could occurred to export some symbols from shared library (some Qt signals for example)
- Add an option in qx::QxSqlDatabase singleton class to display only slow SQL queries (see setTraceSqlOnlySlowQueriesDatabase() and setTraceSqlOnlySlowQueriesTotal() methods)

Changes in version 1.4.4:
QxOrm library doesn't depend on boost framework anymore (the boost dependency has been fully removed, replaced by some C++11 features).
So QxOrm library is now a pure Qt library which depends only on QtCore and QtSql by default.
For backward compatibility, QxOrm library still supports some boost classes (boost smart-pointers, unordered containers, boost::optional, etc...) : you have to define _QX_ENABLE_BOOST compilation option to enable these features.

Main advantages are :
- QxOrm becomes a much lighter library
- easier to install (because you don't have to deal with boost anymore)
- reduce compilation times
- reduce output binary size

Thx also to Jimmy Taker for several improvments and new features in QxModelView module !

- QxOrm library now requires a C++11 compiler (please note that QxOrm doesn't require a full compliant C++11 compiler : for example, QxOrm can be built and used with MSVC 2012, GCC 4.5 or Clang 3.2)
- Implement PIMPL idiom for some QxOrm classes to reduce compilation times and output binary size
- New class named qx::any to replace boost::any (basic implementation of boost::any written by Kevlin Henney)
- qx_shared_ptr alias doesn't exist anymore : it is replaced everywhere by std::shared_ptr
- QxModelView module : all models based on qx::IxModel class can now be sorted (on all columns), please note that you can also use QSortFilterProxyModel Qt class to sort your model
- QxModelView module - qx::QxModel<T> : fix setData() with e_auto_update_on_field_change option when an error occurred saving data in database, now previous value is restored if an error occurred
- QxModelView module - qx::IxModel : fix setHeaderData() using it with default role (Qt::EditRole) changes the header in a header view (role Qt:isplayRole)
- QxModelView module - qx::IxModel : if a description is registered in QxOrm context, then it is displayed in header for each property
- QxModelView module : new feature available to add automatically an empty row at the end of the table to insert quickly new items (setShowEmptyLine() method)
- QxModelView module : possibility to define an intermediate base class between qx::IxModel and qx::QxModel<T> to provide your own model features, for example imagine you develop a drag&drop feature in a class named IxModelDragDrop, you can now create a QxOrm model like this (see the second template parameter) : qx::IxModel * pModel = new qx::QxModel<MyPersistantClass, IxModelDragDrop>();
- : fix DESTDIR parameter on Windows
- QxOrm.pri and QxOrm.cmake : add a section to enable QT_USE_QSTRINGBUILDER to optimize QString operations
- QxOrm library is now tested with MSVC 2015 compiler (support all MSVC versions from 2012)
- Fix a bug in QxSqlError.h file with a qPrintable() call on a temporary object
- Provide more details in logs after executing a SQL query : time to execute query in database + time to fetch C++ instances
- Support std::optional<T> (if your compiler supports C++17 features) to manage NULL database value : new header available named <QxExtras/QxStdOptional.h> to include just after <QxOrm.h> header file (ideally in a precompiled header)

Changes in version 1.4.3:
- Support CMake : new CMakeLists.txt file added to build QxOrm library with CMake
- Improve SQL error messages when qx::dao functions return a database error
- New parameter in singleton class qx::QxSqlDatabase to log SQL bound values (setTraceSqlBoundValues) : by default, bound values are logged when an error occurred
- New syntax to select columns to not fetch : -{ col_1, col_2, etc... }
- New function qx::dao::call_query_without_prepare() to execute specific SQL queries without prepared statement
- Improve QxModelView module : all QxOrm models (based on qx::IxModel interface) can be serialized to JSON format (including all relationships levels) : this is now another way to work with relationships and QML (thanks to JSON.parse() and JSON.stringify() javascript functions) without using nested models concept (so without using QxEntityEditor model/view generated classes)
- Improve qxBlogModelView sample project and QxOrm manual to show how to access to relationships data in QML (nested models or JSON)
- Fix a memory leak in qx::QxSqlRelation class
- Reduce output binary size (~20%) and compilation times (~20%) to build persistent classes based on QxOrm library
- Support unity build concept to reduce compilation times to build QxOrm library and C++ persistent classes generated by QxEntityEditor application : for more details, see _QX_UNITY_BUILD compilation option in QxOrm.pri or QxOrm.cmake configuration file
- Improve QxConvert module : possibility to store in database complex QVariant properties which contain QVariantMap, QVariantHash or QVariantList types (JSON format)
- Fix an issue with some databases when a foreign key is also a part of the primary key
- Fix an issue with QSharedPointer and boost::serialization when a same raw pointer is shared by several QSharedPointer during deserialization process

Changes in version 1.4.2:
- Support JSON serialization : each C++ class registered in QxOrm context can be serialized/deserialized in JSON format (JSON feature requires Qt5)
- For more details about JSON serialization, read QxOrm manual here :
- With JSON serialization and QxService module : it is now possible to create REST Web Services to send data to a javascript engine (web pages for example)
- Fix some compilation errors with recent (and less permissive) compilers and latest versions of boost and Qt
- Fix relationship initialization assertion with complex, deep and circular relationships in large database schema
- Improve QDataStream serialization : should be faster now and fix an issue with circular instances dependencies
- Fix a bug fetching 1-n and n-n relationships when root is a container of stack objects (it worked only with pointers or smart-pointers, for example : QList<blog> vs QList<std::shared_ptr<blog>>)
- Improve qx::dump() function : possibility to display a C++ instance state in XML or JSON format

Changes in version 1.4.1:
!!! IMPORTANT NOTE ABOUT THIS VERSION !!! : it is strongly recommended to read the QxOrm.pri configuration file of this new version (compilation options have changed compared to previous versions).
Now, by default, QxOrm library is a much lighter library : QxOrm depends only on QtCore and QtSql (boost serialization is now optional and not required by default).
By default, serialization engine is now based on Qt QDataStream class (but you can still enable boost serialization defining _QX_ENABLE_BOOST_SERIALIZATION compilation option in QxOrm.pri configuration file).
So now, with default options :
- QxOrm 1.4.1 is much easier to install because you don't have to deal with boost serialization extra dependency ;
- QxOrm 1.4.1 shared library is 3X smaller than 1.3.2 version ;
- Generated binaries which depends on QxOrm library are 25% smaller ;
- If you are not using serialization functions in current projects based on QxOrm library, then you can define or not _QX_ENABLE_BOOST_SERIALIZATION compilation option without changing any line of your source code.

Here are all other changes of version 1.4.1:
- Improve relationships engine : possibility to select columns to fetch using syntax : my_relation { col_1, col_2, etc... }
- Improve QxTraits module to reduce compilation times and build smaller binaries
- Improve QxOrm website adding possibility to search and replacing the old FAQ by a more organized manual (user guide)
- New compilation option _QX_ENABLE_BOOST_SERIALIZATION to enable boost serialization dependency (read QxOrm.pri configuration file for more details)
- New compilation option _QX_ENABLE_QT_NETWORK to enable QxService module (transfer persistent layer over network) : read QxOrm.pri configuration file for more details
- New compilation option _QX_NO_RTTI to build QxOrm library without C++ RTTI type information
- Support QDataStream Qt serialization engine (used by default when _QX_ENABLE_BOOST_SERIALIZATION compilation option is not defined)
- Improve qx_query class (SQL queries) : new method (named customOperator()) which gives the possibility to define a custom operator (for example <@ for PostgreSQL ltree type)
- Fix a program startup issue due to 'static initialization order fiasco' creating singletons (it was an issue with some compilers during the shared library link process)
- New namespace qx::dao::throwable : same functions as qx::dao namespace, but they throw a qx::dao::sql_error exception when a SQL error occurred (instead of returning a QSqlError instance)
- Add a qAssertMsg() macro to put a more explicit error message when throwing an assertion
- Include all *.inl files (template implementation) in project file : QtCreator can now index these *.inl files in its project treeview
- Rename QxStringCvt to QxConvert : so if you persist custom types to database, you have to rename from QxStringCvt_FromVariant, QxStringCvt_ToVariant to QxConvert_FromVariant, QxConvert_ToVariant

Changes in version 1.3.2:
- Support C++11 types (need to set compilation options in QxOrm.pri config file to enable these features)
- With _QX_CPP_11_SMART_PTR compilation option : std::unique_ptr, std::shared_ptr, std::weak_ptr
- With _QX_CPP_11_CONTAINER compilation option : std::unordered_map, std::unordered_set, std::unordered_multimap, std::unordered_multiset
- With _QX_CPP_11_TUPLE compilation option : std::tuple

Changes in version 1.3.1:
- New class qx::QxModelService<T, S> in QxModelView module to connect a Qt model to services to execute client-server requests (can be used with QML and QtWidgets views)
- Add some useful methods to qx::IxModel class and fix several issues with the QxModelView module
- Support last version of MinGW with large precompiled header bug : new compilation option _QX_NO_PRECOMPILED_HEADER (to enable in QxOrm.pri file)
- Fix issue when loading several shared libraries on Windows with services registered in QxService module
- Fix the qx::QxSqlQuery serialization process used by QxService module to send requests over network
- Fix an issue with qx::QxCollection<Key, Value> class when inserting an item at last position

Changes in version 1.2.9:
- Improve nested models in QxModelView module to be able to use several relationships levels in QML

Changes in version 1.2.8:
- New function qx::model_view::create_nested_model (QxModelView module) used by QxEntityEditor to manage complex data structure to work with relationships in QML views and Qt model/view architecture
- New section in the QxOrm.pri file with some tips to reduce output binaries size
- Fix the call of triggers to have the inserted ID inside the trigger function with PostgreSQL

Changes in version 1.2.7:
- New module QxModelView : now, all classes registered into QxOrm context can be used with Qt model/view architecture (Qt widgets and/or QML views)
- qx::IxModel interface provides an easy way to work on QML with QxOrm library and interact with databases
- For more details about the new module QxModelView, goto the FAQ : 'How to use QxModelView module to interact with Qt model/view architecture (Qt widgets and/or QML views) ?'
- New function qx::dao::save_with_relation_recursive(), useful to save a full tree structure for example
- Remove the dependency on the STL compatibility functions in Qt (QT_NO_STL), which may not be available (thanks to KDE Plasma Media Center team for the patch)
- Support database table defined into a schema (using qx::IxDataMember::setName() function)

Changes in version 1.2.6:
- First version full compatible with QxEntityEditor application : the graphic editor for QxOrm library !
- For more details about QxEntityEditor, go to QxOrm website :
- Thanks to the recent release of Qt 5.2, QxOrm library can now be used on Android and iOS
- Improve relationships and triggers engine
- Triggers onBeforeFetch() and onAfterFetch() called when fetching relationships
- Fix release mode detection during compilation : should improve performance on some environments
- Add serialization for QSqlError, qx::QxSqlQuery, qx::QxInvalidValue and qx::QxInvalidValueX classes

Changes in version 1.2.5:
- New license : go to download page of QxOrm website for more details
- Support Qt5
- New compiler supported : Clang (tested on Mac OS X)
- Now each QxOrm version will be tested in 32-bit and 64-bit mode
- Improve QxOrm introspection engine : possibility to register static class methods
- Improve QxService module : now it's easy to add an authentication process on server side
- New class qx::exception to get error code + error description with services methods throwing an exception
- New settings available in QxOrm.pri config file (whithout changing QxConfig.h file)
- Possibility to implement specifics database SQL functions overriding qx_query class
- Fix an issue when fetching multiple levels of relationship and NULL pointers
- Fix a bug with MS SQL Server database and update queries using auto-increment id

Changes in version 1.2.4:
- New relationship engine to fetch easily many levels of relationships per query
- For more details about this new engine, goto the FAQ : 'How to use relationship engine to fetch datas from many tables ?'
- Add 2 functions : qx::dao::execute_query and qx::dao::call_query to call a stored procedure or a custom SQL query
- For more details about this new feature, goto the FAQ : 'How to execute a stored procedure or a custom SQL query ?'
- Add support for boost::optional type to manage NULL database value without using QVariant type
- New class : qx::QxDaoAsync to make easier to execute queries in asynchronous way (multi-thread)
- For more details about this new class, goto the FAQ : 'How to use qx::QxDaoAsync class to execute queries in asynchronous way (multi-thread) ?'

Changes in version 1.2.3:
- New interface 'qx::IxPersistable' (abstract class) to simplify polymorphism using QxOrm library
- For more details about this new interface, goto the FAQ : 'How to use qx::IxPersistable interface ?'
- New methods into 'qx::IxCollection' interface to iterate over each items without knowing its type
- New option into 'QxOrm.pri' file to build QxOrm library statically (see '_QX_STATIC_BUILD' option)
- New triggers : 'qx::dao::on_before_fetch' and 'qx::dao::on_after_fetch' (for more details, goto the FAQ : 'How to define a Trigger with QxOrm ?')
- Add 'std::type_info' class information to introspection engine
- Some minor bugs fixed ('qx::dao::sql_error' exception message, SQL query column alias, mutex, etc.)

Changes in version 1.2.2:
- New module to provide a validation engine : QxValidator module
- For more details about QxValidator module, goto the FAQ of QxOrm library : 'How to use QxValidator module to validate automatically an instance ?'
- Fix last insert ID with PostgreSQL using 'RETURNING' keyword : fetch inserted ID instead of OID
- Improve SQL generator providing the good SQL type for all databases
- Add support for special database keywords using '[', ']' and '"' characters

Changes in version 1.2.1:
- Improve 'qx::QxSqlQuery' class : new engine to build queries without writing SQL, for more details, see the FAQ 'How to build a query without writing SQL with the class qx::QxSqlQuery ?'
- Improve 'qx::QxSession' class : provide persistent methods (CRUD) without using 'qx::dao' functions, for more details, see the FAQ 'How to use a session (qx::QxSession class) to manage automatically database transactions (using C++ RAII) ?'
- Implement 'repository' pattern to provide a common interface for persistent methods (CRUD) with 3 new classes : 'qx::IxRepository', 'qx::QxRepository<T>' and 'qx::QxRepositoryX'
- Possibility to serialize a QVariant 'UserType' with serialization engine of QxOrm library
- Improve thread-safe 'qx::cache' : add insertion date-time into the cache to verify that an element must be updated or not, for more details, see the FAQ 'How to use the cache (functions into namespace qx::cache) of QxOrm library ?'
- FAQ updated on QxOrm website with now 28 questions and answers

Changes in version 1.1.9:
- Possibility to register automatically Qt meta-properties (using Q_PROPERTY macro) to QxOrm context without writing mapping function per class (void qx::register_class<T>())
- Strong integration with Qt introspection/moc engine : for more details about this new feature, goto the FAQ 'How to register automatically Qt meta-properties to QxOrm context ?'
- Improve introspection/reflection engine : see the FAQ (How to use introspection engine (or reflection engine) of QxOrm library ?) for more details
- Possibility to add meta-data (using a property bag) to introspection engine : see 'IxClass', 'IxDataMember' and 'IxFunction' classes for more details
- Add function 'qx::QxClassX::dumpSqlSchema()' to explain how to create your own SQL schema based on C++ classes
- New class 'qx::QxSimpleCrypt' to provide encryption/decryption (thanks very much to Andre Somers) : so it's now possible to store encrypted data into database without using an external library
- QxService module : new feature to encrypt/decrypt data before transfering it over network

Changes in version 1.1.8:
- QxOrm library can now be used on Mac (thanks very much to Dominique Billet) : see '' and '' scripts to build QxOrm library and all samples in './test/' directory
- Add 'qx::QxSession' class : define a session to manage automatically database transactions (using C++ RAII), see the FAQ for more details
- Add 'qx::QxDateNeutral', 'qx::QxTimeNeutral' and 'qx::QxDateTimeNeutral' classes : helper classes to store date-time value into database under neutral format => cross database compatibility

Changes in version 1.1.7:
- Add soft delete behavior : see the FAQ (How to define a soft delete behavior ?) for more details about this new feature
- Add functions into namespace 'qx::dao' to update an element with a SQL condition : update_by_query, update_optimized_by_query, etc.
- Fix a bug when QVariant type is used for a property of a persistent class : so, it's now possible to insert NULL value into database

Changes in version 1.1.6:
- QxOrm library online documentation available : <>
- Possibility to disable QtGui dependency using compilation option in 'QxConfig.h' file : _QX_ENABLE_QT_GUI_DEPENDENCY
- Possibility to disable QtNetwork dependency (so QxService module too) using compilation option in 'QxConfig.h' file : _QX_ENABLE_QT_NETWORK_DEPENDENCY
- Provide a new macro to register abstract class into QxOrm context : QX_REGISTER_ABSTRACT_CLASS()

Changes in version 1.1.5:
- New feature available : 'QxService' module to create C++ application server
- 'QxService' provides an easy and powerful way to create services and to transfer data over network
- New tutorial available to explain how 'QxService' module works
- New sample available at './test/qxClientServer' directory
- QxOrm can be built with 'CONFIG += no_keywords' flag in '*.pro' files
- Bug fix with 'qx::dao::create_table<>' function and relation 'many-to-many'
- QxOrm should now build fine with GCC <= 4.2

Changes in version 1.1.4:
- New parameter in functions 'qx::dao::fetch_by_id', 'qx::dao::fetch_all', 'qx::dao::fetch_by_query' and 'qx::dao::update' to define a list of properties to fetch/update (by default, all properties are fetched/updated)
- Support multi-columns primary key (composite key) : see sample './test/qxBlogCompositeKey/'
- Improve strategy of inheritance : QxOrm supports 'Concrete Table Inheritance' strategy ('Concrete Table Inheritance' becomes default strategy)
- New smart-pointer 'qx::dao::ptr<T>' based on Qt 'QSharedPointer<T>' to provide 2 new features : 'is dirty' and 'update optimized'
- 'qx::dao::ptr<T>' can be used with a simple object and with many containers (stl, boost, Qt and 'qx::QxCollection' containers)
- 'qx::dao::ptr<T>' keeps original values from database and provides a 'isDirty()' method to retrieve all properties changed
- 'qx::dao::update_optimized' must be used with 'qx::dao::ptr<T>' to save into database only properties changed

Changes in version 1.1.3:
- This version works fine with MinGW on Windows

Changes in version 1.1.2:
- License LGPL
- Fix compilation problems on Linux and boost > 1.38
- Fix sql query with MySql database
- Disable assert when qx::dao functions return an error

Changes in version 1.1.1:
- This version supports Visual Studio 2010

Changes in version 1.1.0:
- First release