Do not overwrite inclusion but scope them. Needed in relation hasManyThrought
This commit is contained in:
parent
1b001eedd3
commit
aaf037fc51
|
@ -246,9 +246,15 @@ function mergeQuery(base, update) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overwrite inclusion
|
// Merge inclusion
|
||||||
if (update.include) {
|
if (update.include) {
|
||||||
|
if (!base.include) {
|
||||||
base.include = update.include;
|
base.include = update.include;
|
||||||
|
} else {
|
||||||
|
var saved = base.include;
|
||||||
|
base.include = {};
|
||||||
|
base.include[update.include] = [saved];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (update.collect) {
|
if (update.collect) {
|
||||||
base.collect = update.collect;
|
base.collect = update.collect;
|
||||||
|
|
Loading…
Reference in New Issue