We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34193
    • 330 Posts
    in the docs it states
    You’ll see here that this table extends "xPDOSimpleObject", rather than xPDOObject. This means that the table comes already with an "id" field, that is an auto-increment primary key.

    What if my primary key is called something else, do i just list this in the deffinition of the schema like the other fields.
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: peteedley at May 20, 2010, 12:27 PM

      in the docs it states
      You’ll see here that this table extends "xPDOSimpleObject", rather than xPDOObject. This means that the table comes already with an "id" field, that is an auto-increment primary key.

      What if my primary key is called something else, do i just list this in the deffinition of the schema like the other fields.
      Correct, don’t extend xPDOSimpleObject in that case; just extend xPDOObject and define your primary key field explicitly. Otherwise it is inherited from the xPDOSimpleObject map as a primary key field named id.