yesodweb/persistent — pull request #82 by superbobry (2012-06-26 11:37:44+00:00)
Title: Support for nested labels in 'persistent-mongoDB'

Hello, the current version of *persistent-mongoDB* doesn't support nested labels, so for example the following code doesn't work **as expected**, treating `self.name` as a flat field name:

```haskell
share [mkPersist sqlSettings] [persist|
Person sql=person
name String Eq sql=self.name
age Int
deriving Show
|]

doSomething = do
_personId <- insert $ Person "Garry" 3
person <- selectFirst [PersonAge ==. 3] []
liftIO $ print person

main :: IO ()
main = do
withMongoDBConn "test" "127.0.0.1" $ \pool -> do
runMongoDBConn DB.master action pool
return ()
```

I've updated `insertFields` and `mapFromDoc` to support nested label, so now `self.name` is saved as:

```json
{self: {name: "Garry"}}
```