datascript

shader 2023-10-11T19:08:54.087159Z

has anyone else run into an issue where entity references aren't "live" in pull results like they are in an entity?

shader 2023-10-11T19:27:46.124919Z

like, the reference will print as #{db <n>} , but if I try to get any attributes from it they all return nil...

sergey.shvets 2023-10-11T19:47:45.144819Z

can it be that you hold an old db atom? For example, if you deref db before making a change, you'll still have an old database state in that variable.

shader 2023-10-11T19:53:04.835529Z

Pretty sure that's not the issue. To be precise, I've never gotten a working reference from a pull. Maybe it's intentional, and I need to do some kind of recursive pull?

2023-10-11T20:02:25.669879Z

What is (type #{db <n>}) returning?

2023-10-12T12:53:27.408549Z

> Maybe it's intentional, and I need to do some kind of recursive pull? Yeah I think it's this. What's the code you're running? d/entity is supposed to return "live" results that can traverse the db, d/pull doesn't it just returns the data you ask of it