Skip to content

Commit eaca855

Browse files
authored
fix(hierarchy): only modify where if existent (#1265)
1 parent cc627ee commit eaca855

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

db-service/lib/cqn2sql.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ class CQN2SQLRenderer {
282282
SELECT_recurse(q) {
283283
let { from, columns, where, orderBy, recurse, _internal } = q.SELECT
284284

285-
const keys = []
286285
const _target = q._target
287286

288-
if (_target) {
287+
if (_target && where) {
288+
const keys = []
289289
for (const _key in _target.keys) {
290290
const k = _target.keys[_key]
291291
if (!k.virtual && !k.isAssociation && !k.value) {

0 commit comments

Comments
 (0)