MongoDBx::AutoDeref::DBRef - DBRef representation in Perl
MongoDBx::AutoDeref::DBRef is the Perl space representation of Mongo database references. These ideally shouldn't be constructed manually, but instead should be constructed by the internal MongoDBx::AutoDeref::LookMeUp class.
is: ro, isa: MongoDB::Connection, required: 1
In order to defer fetching the referenced document, a connection object needs to be accessible. This is required for construction of the object.
is: ro, isa: MongoDB::OID, reader: id, required: 1
This is the OID of the object.
is: ro, isa: Str, reader: ref, required: 1
This is the collection in which this item resides.
is: ro, isa: Str, reader: db, required: 1
This is the database in which this item resides.
is: ro, isa: MongoDBx::AutoDeref::LookMeUp, weak_ref: 1, required: 1
When fetching referenced documents, those documents may in turn reference other documents. By providing a LookMeUp object, those other references can also be travered as DBRefs.
This method returns a hash reference in the DBRef format suitable for MongoDB serialization.
fetch also accepts a hashref of fields-as-keys that will be passed unaltered directly to the MongoDB driver as a way to limit the fields pulled back.
Nicholas R. Perez <email@example.com>
This software is copyright (c) 2010 by Nicholas R. Perez <firstname.lastname@example.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.