emberfeather / algid-mongodb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MongoDB Model Get Should Always Return Value

Zoramite opened this issue · comments

In order for the model to be more flexible, since the db doesn't restrict the schema, the model should by default return a value even if the value has not been set.

Optionally the get should accept an argument for a default value if the value has not been defined.

Added the functionality to the mongodb model to always return a value for attributes even when they don't exist.

This allows for the more fluid documents stored by mongodb.

Closed by 9d2a331