Wt::Dbo is a brand new C++ ORM layer. Similar to Hibernate for Java and ActiveRecords for Ruby, Wt::Dbo offers a convenient way to interact with objects which are serialized in a database.

Although the lack of introspection in C++ seems to be problematic to write a decent ORM in C++, Wt::Dbo demonstrates that appropriate use of the C++ template system offers a perfect alternative.

Currently, Wt:dbo contains the following functionality:
<ul>
<li>Automatic schema creation</li>
<li>Mapping of 1-N and M-N relations</li>
<li>Lazy loading of objects and collections</li>
<li>Uses prepared statements throughout</li>
<li>Basic query support</li>
<li>Automatic dirty checking and database synchronization</li>
<li>Built-in optimistic locking (using a version field)</li>
<li>Transactional integrity, even when a transaction fails: dirty objects remain dirty and may later be saved in a new transaction, or may be reverted to their persisted state (unlike Hibernate where you are forced to discard the whole session)</li>
<li>Transaction write-behind for changes, with support for manual flushing</li>
<li>Forces use of surrogate keys</li>
<li>Does not depend on Wt (can be used independently)</li>
<li>Simple backend system: at the moment only SQLite3. We are looking at how we can perhaps can leverage SOCI if it makes its way into Boost.</li>
</ul>