I am fairly new to this library, and ORM in general. I know tools like EntityFramework can generate code from a database. Can ODB for C++ do this work?
Asked
Active
Viewed 1,571 times
7
-
I created php script to create classes from MySQL tables, check it [here](https://github.com/crgarridos/cpp_odb_generator) – crgarridos Mar 10 '16 at 13:56
2 Answers
2
I don't think so. Looking at the main page of the project, there is an example how to use ODB. It seem that you need only add some pragmas
here and there:
#pragma db object
class person
{
...
private:
friend class odb::access;
person () {}
#pragma db id
string email_;
string name_;
unsigned short age_;
};
but you do that on already present code, so no, it does not generate anything.

Lyubomir Vasilev
- 3,000
- 17
- 24
-
1so what this means in the help of the odb, in windows: "--database | -d (db) Generate code for the database (db)" – hossein hashemian Oct 09 '12 at 09:53
-