Fixed #564 - build crashes when no primaryKey on autoIncrement column