projects
/
xtuple
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8232f00
)
Also check for undefined orderBy
author
Ben Thompson
<ben@xtuple.com>
Tue, 6 May 2014 17:32:07 +0000
(13:32 -0400)
committer
Ben Thompson
<ben@xtuple.com>
Tue, 6 May 2014 17:32:07 +0000
(13:32 -0400)
lib/orm/source/xt/javascript/data.sql
patch
|
blob
|
history
diff --git
a/lib/orm/source/xt/javascript/data.sql
b/lib/orm/source/xt/javascript/data.sql
index
857ee0e
..
74c3ba0
100644
(file)
--- a/
lib/orm/source/xt/javascript/data.sql
+++ b/
lib/orm/source/xt/javascript/data.sql
@@
-1909,7
+1909,7
@@
select xt.install_js('XT','Data','xtuple', $$
/* Because we query views of views, you can get inconsistent results */
/* when doing limit and offest queries without an order by. Add a default. */
- if (limit && offset &&
!orderBy.length
&& !clause.orderByColumns) {
+ if (limit && offset &&
(!orderBy || !orderBy.length)
&& !clause.orderByColumns) {
/* We only want this on sql1, not sql2's clause.orderBy. */
clause.orderByColumns = XT.format('order by t1.%1$I', [pkeyColumn]);
}