Skip to content
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

model.Create will always use model.id as the id, ignoring configuration provided in model.json #20

Open
lautarodragan opened this issue Aug 1, 2016 · 0 comments

Comments

@lautarodragan
Copy link

Take a look at lib/dataBuilder/CreateDataBuilder.js#L50:

var idkey = readDocumentID(inboundData, callback);
this.setIdKey(idkey);

lib/dataBuilder/CreateDataBuilder.js#L83:

var idkey = data && data[constants.KEYWORD_CONVENTION_DOCID];
if(!idkey){
    idkey = uuid.v4();
    debug("No document id defined, create one for it : "  + idkey );
}

and lib/base/constants.js#L28

define("KEYWORD_CONVENTION_DOCID", "id");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant