July 21st, 2006, 05:54 PM
Open source ORM frameworks for C++??
Can anyone recommend a free/low-cost/open-source ORM framework for C++, something along the lines of Hibernate?
I've done some asking and searching around and there doesnt seem to be one. Just want to confirm if this is the case?
July 21st, 2006, 06:28 PM
I googled it and couldn't find anything.
Welcome! to the forums.
July 21st, 2006, 10:16 PM
Here is somebody with the same problem; perhaps a good answer is there? Or this?
Last edited by peenie; July 22nd, 2006 at 12:52 PM.
OMG RAVER CHICKS!!
On a related note: C/C++ Programming Tutorials
"Science is based on reality staying the same, and Nature ignores what humans vote upon." -- Bill Beaty
"Three litres of sherry up the butt can only be described as astounding." -- Darwin Awards
July 22nd, 2006, 12:36 PM
Thanks. OpenORM and DTL look interesting, I'll investigate them further.
Thanks for the welcome, nice to know its a friendly communiy
July 22nd, 2006, 01:55 PM
It is! But the mods at least don't like new people if they don't read the how to post a question. So make sure you read that!
Edit:I know I didn't say it was a bad title at all... I just meant thats what they don't like just for a warning.
Comments on this post
July 22nd, 2006, 05:07 PM
I did read it actually and i dont see whats wrong with the title.
October 3rd, 2010, 09:06 AM
I know it is an old thread, but I thought I would add this in case someone else has the same question.
There is a new, open-source, compiler-based ORM system for C++ called ODB. The big difference between ODB and the other libraries mentioned above is that ODB allows you to persist C++ objects to a relational database without manually writing any mapping code.
The C++ code that performs the conversion between persistent classes and their database representation is automatically generated by the ODB compiler. The ODB compiler is a real C++ compiler except that instead of producing assembly or machine code, it generates portable C++ which can in turn be compiled by any C++ compiler.
Here is an example of a persistent class declaration in a C++ header:
Given this class, we can perform various database operations with its objects:
#pragma db object
friend class odb::access;
#pragma db id auto
unsigned long id_;
unsigned short age_;
ODB is cross-platform and cross-database. Check it out.
person john ("John", "Doe", 31);
person jane ("Jane", "Doe", 29);
transaction t (db.begin ());
result r (db.query (query::last == "Doe" && query::age (cout, "\n"));
jane.age (jane.age () + 1);
Comments on this post