Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Hi !
In order to migrate some data to
GenericReferenceField, I simply used aDBRefas defined in MongoDB documentation: https://docs.mongodb.org/v3.0/reference/database-references/It took me some time and some code reading to understand that
GenericReferenceFieldwrapsDBRefin a{_cls: 'ClassName', _ref: DBRef}object.So, I'm wondering why is
GenericReferenceFieldusing this pattern instead of the standardDBRef. It's harder to query, harder to read and to me the_clsis useless because:_clsattribute is stored in the document itself so the collection is sufficient tooAt first I was thinking that it permit, in the case of inheritance, to only fetch the required attribute on dereferencing but, it's not allowed anymore to store more field that the model has and this reasoning does not stand for
DynamicDocument.So can someone explain me this choice? Is there some historical reason ? Am I missing something ?
The text was updated successfully, but these errors were encountered: