又调整回来listNode取freshValue的逻辑,要加上filter判定
This commit is contained in:
parent
6283c03f63
commit
495b7ff675
|
|
@ -770,7 +770,7 @@ class ListNode extends EntityNode {
|
|||
* 若本结点为脏,则要考虑当前这些ids是否还满足filters,若一个结点出现这种情况要考虑,则要自己保证filter中的关联关系数据都在cache当中,不然会出现数据为空
|
||||
* by Xc 20250308
|
||||
*/
|
||||
const filter2 = inModiNextBranch ? filter : (ids2.length > 0 ? (filter && this.isDirty() ? combineFilters(this.entity, this.cache.getSchema(), [filter, {
|
||||
const filter2 = inModiNextBranch ? filter : (ids2.length > 0 ? (filter ? combineFilters(this.entity, this.cache.getSchema(), [filter, {
|
||||
id: {
|
||||
$in: ids2,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -937,12 +937,11 @@ class ListNode<
|
|||
|
||||
const ids2 = ids.concat(createIds);
|
||||
/**
|
||||
* 在非modi状态下,当前的逻辑是:
|
||||
* 若本结点非脏(其子结点也非脏),直接用ids作为查询条件(这里也隐喻着父结点不会影响这里的数据)
|
||||
* 若本结点为脏,则要考虑当前这些ids是否还满足filters,若一个结点出现这种情况要考虑,则要自己保证filter中的关联关系数据都在cache当中,不然会出现数据为空
|
||||
* by Xc 20250308
|
||||
* 在非modi状态下,当前的逻辑是用当前filter加以过滤,不然就处理不了在列表中操作改变了filter中外联的条件(例如为order创建了一个ship,但查询条件是没有ship)时,列表不发生变化
|
||||
* 所以在这里当前是要求用户在取数据的时候,将可能影响的这种外联的数据也取到cache当中
|
||||
* by Xc 20250315
|
||||
*/
|
||||
const filter2 = inModiNextBranch ? filter : (ids2.length > 0 ? (filter && this.isDirty() ? combineFilters(
|
||||
const filter2 = inModiNextBranch ? filter : (ids2.length > 0 ? (filter ? combineFilters(
|
||||
this.entity,
|
||||
this.cache.getSchema(),
|
||||
[filter, {
|
||||
|
|
|
|||
Loading…
Reference in New Issue