Ah, that's not what my plugin is for; there are some ORM's that handle MongoDB
though but not many. Mongoose is one, but realistically since NoSQL is
schemaless storage, it's often easier to just work with the raw hash data you
get back than it is to have an ORM. In cases where people need it, I think
most just end up writing their own mapper classes to deal with it.
On 01/29/2013 11:23 PM, Miguel Dias wrote:
> I saw that plugin as well...
>
> I think *I'm missing something* ( don't take the following comments wrong):
> but from the description of your plugin you are using it to connect to
> mongodb, fetch collections, etc etc but what about if you want to define
> attributes of a "class" say "Post" shouldn't you have a MongoDB::Document
> and there you define "IdPost , int, required"; "Message, varchar2 ";
> Something alike ...
>
> Ain't the point of NoSQL to define the attributes of a class for example in
> perl rather than in DB? Where do you define the "schema" of you database
> using your plugin ?
>
> Similar to:
>
> package CDDB::Album;
>
> use MongoDBI::Document;
>
> # collection name
> store'albums';
>
> # required fields
> key'title', is_str, is_req;
> key'released', is_date, is_req;
>
> # optional fields
> key'rating', is_int, default=> 1;
> <
http://search.cpan.org/%7Efriedo/MongoDB-0.503.3/lib/MongoDB/Tutorial.pod>
> note /"NOTE: This librrary is scheduled for a complete rewrite in the
> comming months."/ made me thought if there is another module or way to do.
>
> Does anyone have an experience with mojolicious and mongodb willing to
> share ?
>