Referencing data with DBRef

pp77. & here

When Googling DBRef, i stumbled across quite a few recommendations not to use it, but think of an alternative e.g. here and here. From a quick skim, these seem to be objections based around application performance.

With DBRef, the DB ref is stored as a standard embedded object. 
{ $ref : <collectionName>, $id : <id value>[. $db : <database name>] }

Suppose I had added some data and in one collection and wanted to reference it in another? For example…

<more coming soon…>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s