[web-devel] mongodb test issue and nested models

Richard Plangger planrichi at gmail.com
Tue Jun 26 20:44:44 CEST 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20120626/af47a4ab/attachment.htm>


More information about the web-devel mailing list