NAME

Mongol::Entity

SYNOPSIS

DESCRIPTION

EVENTS

ATTRIBUTES

collection

Person->collection()

id

my $id = $model->id();
my $current_id = $model->id( '12345' );

METHODS

find

my $cursor = Person->find( { age => 30 }, {} );

find_one

my $model = Person->find( { name => 'John Doe' }, {} );

retrieve

my $model = Person->retrieve( $id );

count

my $count = Person->count( { age => '30' }, {} );

exists

my $bool = Person->exists( $id );

update

delete

save

$model->age( 35 );
$model->save();

remove

$model->remove();

drop

Person->drop();

SEE ALSO