coresmart / persistencejs

persistence.js is an asynchronous Javascript database mapper library. You can use it in the browser, as well on the server (and you can share data models between them).
http://persistencejs.org
1.73k stars 240 forks source link

Order by clause sorts int fields as strings #137

Closed shustariov-andrey closed 10 years ago

shustariov-andrey commented 10 years ago

Hi

The issue is reproducing in websql databases. I discovered, that this behavior occurs when order by field is getting 'lowered', i. e. ORDER BY LOWER(Transaction_createdOn)

As I understood from this code, this conversion is conditional

Is it possible to control this behavior somehow? For example, pass third parameter to order method of QueryCollection class?

Thank you in advance.