Commit e5a8a55
committed
Fix prefetched resources are not used by ReferenceField
## Problem
`<ReferenceField>` relies on `getManyAggregate` to call the data provider. Each instance will call a `getMany(resource, [id])`, that react-admin will not pass to the data provider, -but aggregate into a single `getMany(resource, [id1, id2, id3])`.
The prefetch feature pre-populates the `getMany(resource, [id1, id2, id3])` cache, but this isn't enough to prevent the actual data provider query.
## Solution
Prefetched records should be used to populate the cache of *individual* getMany queries.1 parent 3495c54 commit e5a8a55
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
0 commit comments