Rodrigo de Oliveira Gonzalez > Mongoose-0.23 > Mongoose::EmbeddedDocument

Download:
Mongoose-0.23.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.23   Source   Latest Release: Mongoose-0.27

NAME ^

Mongoose::EmbeddedDocument - role for embedded documents

VERSION ^

version 0.23

SYNOPSIS ^

        package Address;
        use Moose;
        with 'Mongoose::EmbeddedDocument';
        has 'street' => is=>'rw', isa=>'Str';

        package Person;
        use Moose;
        with 'Mongoose::Document';
        has 'address' => ( is=>'rw', isa=>'Address' );

DESCRIPTION ^

This role is a copy of Mongoose::Document, but flags the class as 'embedded' so that it's collapsed into a single parent document in the database.

SEE ALSO ^

Read the Mongoose intro or cookbook.

From the MongoDB docs: http://www.mongodb.org/display/DOCS/Updating+Data+in+Mongo#UpdatingDatainMongo-EmbeddingDocumentsDirectlyinDocuments

syntax highlighting: