changed sort
fix addiing duplicate PK attributes in select query
Update query-generator.js
Merge pull request #1410 from ruifortes/master

fix adding duplicate PK attributes in select query