André Knörig
André Knörig
Yeah, what you mention is great for creating nested/embedded fields. An embedded *document* is more than that, as it would have its own unique id (locally unique, but could also...
That's interesting, thanks. I guess what I would like to be able to do is an easy way to do CRUD on these embedded docs. Something along these lines: ````py...
When I add a custom json encoder for the `Link` type, it works fine. Quick hack: ````py class Here(Document) there: Link(There) class Config: json_encoders = { Link: lambda v: {...
A slightly cleaner version that retains all the DBRef properties would look like this: ````py class Config: json_encoders = { Link: lambda v: { "$id": str(v.ref.id), "$collection": v.ref.collection, "$database": v.ref.database...
Thanks, good point–but no, that was just an oversight while typing up the issue here. 😄
Having tried a couple of alternatives myself, I have now settled for the ODM library [Beanie](https://github.com/roman-right/beanie/). It's very much in line with FastAPI philosophies (async, pydantic, etc), well documented and...
> > Having tried a couple of alternatives myself, I have now settled for the ODM library [Beanie](https://github.com/roman-right/beanie/). It's very much in line with FastAPI philosophies (async, pydantic, etc), well...
> How did you solve the _id vs id in Beanie + FastAPI? I think what you want is already the default behaviour for Beanie. All you need to do...
One more here. In my case, the cause turned out to be a duplicate entry in my `.ssh/config` file. Once I cleaned that up, everything worked fine again. Also looking...
Not sure I understand what you mean, what's a "preset"?