7

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?

crgarridos
  • 8,758
  • 3
  • 49
  • 61
  • 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 Answers2

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
2

the QxORM maybe help you to this work. this library use for Qt framework.

hassan deldar
  • 293
  • 1
  • 11