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

Consolidate document id field #253

Merged
merged 5 commits into from
Feb 3, 2019
Merged

Consolidate document id field #253

merged 5 commits into from
Feb 3, 2019

Conversation

jupe
Copy link
Contributor

@jupe jupe commented Jan 28, 2019

Status

READY

Migrations

NO

Description

Testcase and Resource models has conversion for _id field and in API there was visible id. This PR consolidate id handling so that its same for each models - just mongo default _id.
-> Rename testcase and resource identify field: id -> _id that was done in toJSON transformer.

NOTE:

  • This is breaking change - resource and test case identified field is changed from id -> _id.
  • Does not affect opentmi-pyclient neither opentmi-jsclient because they expects already that _id field exists in these documents.

Todos

  • Tests

jupe added 2 commits January 28, 2019 21:19
add virtual property id for backward compatible reason
its replced with _id - which is used in rest of models as well. ->consolidation..
@coveralls
Copy link

coveralls commented Jan 29, 2019

Coverage Status

Coverage increased (+0.4%) to 71.813% when pulling 4e2e0a7 on resource._id into 4203b0f on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 71.813% when pulling f4d332d on resource._id into 4203b0f on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 71.813% when pulling f4d332d on resource._id into 4203b0f on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 71.813% when pulling f4d332d on resource._id into 4203b0f on master.

@jupe jupe changed the title get rid of weird id transform from testcase and resource models Consolidate document id field Feb 3, 2019
@jupe jupe merged commit 12f3d85 into master Feb 3, 2019
@jupe jupe deleted the resource._id branch February 3, 2019 18:42
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

Successfully merging this pull request may close these issues.

2 participants