flatiron / resourceful

an isomorphic Resource engine for JavaScript

Home Page:http://github.com/flatiron/resourceful

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

id/key semantics is not clear

chbm opened this issue · comments

The semantics of the id property are not clear. As far as I can tell the current behavior is engine dependent and I couldn't find documentation or tests regarding the correct behavior of duplicate ids.
Some clarification would be good.

Good catch.

The intended semantic is:

id should be the unique identifier of the document, relative to it's resource.

key should be a unique identifier across the entire database.

We've just implemented this in resourceful v0.3.0, so I would not be surprised if you there are still inconsistencies from previous versions.

Any pull requests to help fix this or improve test coverage around this area would be much appreciated.

Thanks for the feedback.