Can ORM ODB for C++ generate code from a database

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?


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.


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

链接地址: http://www.djcxy.com/p/64476.html

上一篇: 一个C库的python包装的可维护性

下一篇: C ++的ORM ODB可以从数据库生成代码