Closed jseriff closed 7 years ago
@jseriff Thought about this a lot. I'm okay with it. If LoadX gets called on it, it will not be nil. Will implement soon. Solving your other bug right now, making good progress.
@jseriff Have you tried this or the other bug fix yet? Things should be working well on dev.
This is working now in dev. Please let me know when it gets released as a new version.
Thanks!
When doing an eager, the R field is left as null if no eager objects are loaded. I think a non-null R, with an empty array in the loaded relationship would be more appropriate.
To reproduce, here is the schema I used:
So, P1 has no children, and P2 has two children. Create the models for this schema, then run the following:
The output is:
You can see in the output that Parent 0.R is nil. This forces me to check R for nil before looking at the relationship, adding quite a bit of verbosity.