We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27376
    • 576 Posts
    I’m curious if the createObjectContainer will create primary key columns automatically in the future. I successfully created a MySQL db table but was surprised that it did not create the ’id’ column for me (I just so happened to notice that in the MODx field mapping files, none of them contained this ’id’ column).

    So will I need to create the ’id’ column manually in the [tt]*.map.inc.php[/tt] file or is there another method that I’m missing?
      • 27376
      • 576 Posts
      UPDATE: Nevermind, I figured out that I have to extend xPDOSimpleObject and not just xPDOObject in order for the primary key field to be automatically generated.

      So far I’m loving xPDO Jason! My work wants me to build an inventory/worklog tracking system, and I’m building it up using xPDO!

      EDIT: ’be to build’ -> ’me to build’
      • wink

        See, it’s not that unintuitive... in any case, glad you figured that out. Once I have time to document more of this, I hope a lot more people will start to love it.

        Cheers