petomalina
petomalina

Reputation: 2140

Using ODB pragmas

I am trying to understand how does ODB models work.

This is snippet from the official site:

  #pragma db object
  class person
  {
  private:
    friend class odb::access;
    person () {}

    #pragma db id
    string email_;

    string name_;
    unsigned short age_;
  };

My questions is, how can I specify these custom pragmas and then reuse them? (#pragma db object)

Upvotes: 0

Views: 470

Answers (1)

DevSolar
DevSolar

Reputation: 70273

Any #pragma is a compiler-dependent, implementation-defined feature. Any #pragma is, and can only be, documented by the specific compiler in question.

Upvotes: 3

Related Questions