func (db *Database) FindRef(ref *DBRef) *Query {
	var c *Collection
	if ref.Database == "" {
		c = db.C(ref.Collection)
	} else {
		c = db.Session.DB(ref.Database).C(ref.Collection)
	}
	return c.FindId(ref.Id)
}
func (db *Database) FindRef(ref *DBRef) *Query {
	var c *Collection
	if ref.Database == "" {
		c = db.C(ref.Collection)
	} else {
		c = db.Session.DB(ref.Database).C(ref.Collection)
	}
	return c.FindId(ref.Id)
}
func ( db * Database ) FindRef ( ref * DBRef ) * Query { var c * Collection if ref . Database == " " { c = db . C ( ref . Collection ) } else { c = db . Session . DB ( ref . Database ) . C ( ref . Collection ) } return c . FindId ( ref . Id ) }
// NOTE: Order of fields for DBRef above does matter, per documentation.
// FindRef returns a query that looks for the document in the provided
// reference. If the reference includes the DB field, the document will
// be retrieved from the respective database.
//
// See also the DBRef type and the FindRef method on Session.
//
// Relevant documentation:
//
//     http://www.mongodb.org/display/DOCS/Database+References
//
NOTE : Order of fields for DBRef above does matter per documentation . FindRef returns a query that looks for the document in the provided reference . If the reference includes the DB field the document will be retrieved from the respective database . See also the DBRef type and the FindRef method on Session . Relevant documentation : http : // www . mongodb . org / display / DOCS / Database + References