Skip to content
This repository has been archived by the owner on Nov 11, 2018. It is now read-only.

Use a better schema #45

Closed
christianbundy opened this issue Mar 17, 2014 · 0 comments
Closed

Use a better schema #45

christianbundy opened this issue Mar 17, 2014 · 0 comments

Comments

@christianbundy
Copy link
Member

Currently the schema is painful:

{
    "_id" : "SgSKbAh85aMvhXTX3",
    "sx6MWih3gBDqwRvuP" : {
        "okjJXyD8gWbSbdWQ7" : {
            "time" : ISODate("2014-03-17T20:56:26.022Z"),
            "rate" : "4"
        }
    }
}

Whereas it could be something like:

{
    "_id" : "SgSKbAh85aMvhXTX3",
    "user" : "sh5uWrsn7wTxwR2qg",
    "ratings" : {
        "9pACeuqeMWcWx3o6L" : {
            "time" : ISODate("2014-03-17T20:56:26.022Z"),
            "rate" : "4"
        }
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant