Comments (2)
I can reproduce this. The issue is dual pronged, starting with this line in the normalize
function
https://github.com/lilactown/pyramid/blob/main/src/pyramid/core.cljc#L93-L94
basically, normalization doesn't descend into collections of maps where the maps are not entities. The map inside of the vector doesn't contain a key whose name is id
, which is why it's not considered an entity. This means normalization misses the entity identified by :d/id
.
However, we do a second pass to replace entities with their references. This does descend into collections of maps even if they are not entities
https://github.com/lilactown/pyramid/blob/main/src/pyramid/core.cljc#L70-L71
I think what I'd like to do is replace these two functions with a single pass process that both adds entities to the db and replaces them with references, so that we can ensure the way that each collection is visited is the same so that we don't run into issues like this where we lose data.
Thank you for the report! I've added a failing test here: 972eceb
from pyramid.
Fixed in #19
from pyramid.
Related Issues (12)
- pull-report
- Recursive unions HOT 4
- `lambdaisland/uri` HOT 1
- Improve support for partial data sets HOT 3
- Reverse order for lists? HOT 6
- Return indices in pull report
- add-report HOT 1
- Relax requirement for collections with lookup refs to be homogeneous HOT 1
- Delete HOT 1
- Plans for supporting wild card for pulls? HOT 9
- Infer EQL query from data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyramid.