-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compose the _id for a document in a partition database #218
Comments
create()
method to handle missing _id
in a partitioned db
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
See parent story #214
For a non-partitioned db,
db.insert()
will give the document a random string as_id
if it’s missing in the payload. While for partitioned database, _id is a must provide field, the random string need to be generated using 'uuid/v4', see some examples in the driver repo. Let's figure out a better UX for users to provide the id part.Considering when inserting document into a partitioned db, people MUST provide value for
_id
withpartitionKey
specified, let's either_id
from model's id field (invalid value will be rejected by Cloudant service)or
partitionKey
:<partitionKey>: id
, use the full value<partitionKey>: id
Acceptance Criteria
Improve the
create()
method to handle the_id
composition in a partitioned database_id
from model's id field (invalid value will be rejected by Cloudant service)or
partitionKey
:<partitionKey>: id
, use the full value<partitionKey>: id
Developers can config the partition key property follows:
});
The text was updated successfully, but these errors were encountered: