samedi 28 février 2015

C++ ORM - but the other way


After days of searching and studying and making my brain wired I will try to put my thoughts and "questions" here.


I think that there are millions of reasons for using ORM tools like ODB (together with C++).


BUT for me and a some business projects I sometimes want to have a fixed database table layout (which sometimes comes from other people / gets defined by the customer) and I have to "wrap" around them with my C++ classes.


My primary question is: Are there any "ORM" tools that are going the other way than ODB & Co? I mean tools that are automatically generating C++ classes by analyzing the existing database tables' structure(s) and writing header and source files (for the classes)?


I know that this would be (is :-) ) a very simplistic approach because it does not provide any non-simple database driven things like 1-to-many or many-to-many relationships, but in 99% of all cases for me an exact match of database table to C++ class would be perfect.


Does anyone of you have a good recommendation? Or any good advice for doing it this way? Or any hints NOT to do that?





Aucun commentaire:

Enregistrer un commentaire