Skip to content
Advertisement

Tag: dbref

Resolve DBRef into Json

I’m getting the following error in a Normalized Data Model structure in MongoDB: It’s caused by this line: Specifically the toJson() part. I have a DBRef Object in my Document, so I can reference a Document from another Collection. An Embedded Document Structure is not option. So how can I fix this? Answer You have to import the DBRef Codec

Advertisement