PhilWaldmann / openrecord

Make ORMs great again!
https://openrecord.js.org
MIT License
486 stars 38 forks source link

.toSql() return query string with double quotes #42

Closed stts-x closed 7 years ago

stts-x commented 7 years ago

Calling .toSql() method I'm getting the string with double quotes instead of backquotes, which cause a syntax error. In lib/stores/sql/exec.js in 42 line I found a function, replacing backquotes with double quotes. What's the reason of this replacement? Basically, It turns initially correct SQL string to an incorrect one.

PhilWaldmann commented 7 years ago

you are right. I've used toSql() only for the tests. I've just released a fix (version 1.11.1).

Thanks, Philipp