[web-devel] mongodb test issue and nested models

Greg Weber greg at gregweber.info
Wed Jun 27 00:47:42 CEST 2012

I just got around to some persistent-mongodb cleanup (thanks for the
patches from the community). Hopefully I will have time to take a look
at fixing yesod test soon.

The downside & upside of the persistent API is it works across
different databases. Therefore there are no additional docs other than
Haddocks on the mongoDB persistent API.
For any amount of slightly sophisticated embedded usage you will
likely want to do updates with the raw driver:

On Tue, Jun 26, 2012 at 11:44 AM, Richard Plangger <planrichi at gmail.com> wrote:
> Hi there,
> i'm having 2 problems, maybe someone can help me:
> 1) first I would like to write some tests for my web proj. but 'yesod test'
> does not run due to
> a compile time error.
> i get the same error like on this issue but i got no clue how to fix it:
> https://github.com/yesodweb/yesod/issues/349
> 2) second I dunno if my approach is correct.
> I'm using mongodb and i have entities like so:
> A
>      name Text
> B
>      name Text
>      as [A]
> As it compiles like a charm and i can add A types to B entities, these A
> entities do not have
> an _id field. This seems logical to me due to the type A does not have this
> _id property generated, like
> described in the book and i do not 'insert' the A type but simply update a B
> entity.
> I would like to identify (not by index) these nested A entities as i'm going
> to delete/update them from time to time.
> Can you point out the way how I would do that?
> I also searched alot for more docu on the mongoDB persistent api, is there
> any?
> --
> richard
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel

More information about the web-devel mailing list