Editor > Generator > id

Editor > Generator > id

nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
edited October 2012 in Editor
In my existing DB schema, I don't use the "id" attribute, but a different name for the primary key in my table.
When using the generator, I get a PDO error

Column not found: 1054 Unknown column 'id' in 'field list'' in /Users/xx/Sites/xx/functions/datatables/Database/Driver/Mysql/Query.php:98

How can I circumvent this?


  • allanallan Posts: 55,883Questions: 1Answers: 8,835 Site admin
    The default is 'id', but this can easily be change using the third parameter of the Editor PHP class: http://editor.datatables.net/docs/current/php/class-DataTables.Editor.html#___construct . Simply set it to the name of your primary key column and that will do it :-).

This discussion has been closed.