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?
Can ORM ODB for C++ generate code from a database
I created php script to create classes from MySQL tables, check it here –
Christoforo
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.
so what this means in the help of the odb, in windows: "--database | -d (db) Generate code for the database (db)" –
Maggard
that means you are generating the code between c++ and the db –
Christoforo
the QxORM maybe help you to this work. this library use for Qt framework.
© 2022 - 2024 — McMap. All rights reserved.