This repository was archived by the owner on Mar 21, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 113
New unary option readOnly to declare an entity as read-only
#370
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
Thanks @murdos I'll test this out ASAP! |
MathieuAA
suggested changes
Sep 22, 2019
Contributor
MathieuAA
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except the missing test, everything's perfect
| if (entity.jpaMetamodelFiltering === true) { | ||
| addUnaryOptionToJDL(FILTER, entityName); | ||
| } | ||
| if (entity.readOnly === true) { |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing a test here:
- add in the Employee.json file (used in this converter's test file) this entry "readOnly": true.
- in the test, l.156, add this:
expect(
jdlObject
.getOptions()
.filter(option => option.name === UnaryOptions.READ_ONLY && option.entityNames.has('Employee')).length
).to.equal(1);
Contributor
Author
|
Thanks. I'm going to add the missing test. |
Contributor
|
readOnly is good, let's keep it this way |
Contributor
Author
|
Ok. Missing test has been added |
MathieuAA
approved these changes
Sep 22, 2019
Contributor
|
Thanks :) |
Contributor
|
Alright, let's merge it. Thanks @murdos! |
1 task
4 tasks
1 task
Closed
1 task
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #318
I used the keywork
readOnly, but only at end I realized that it could have beenreadonly(both are used in #318).Please let me know what you prefer, and I'll update the PR.
Please make sure the below checklist is followed for Pull Requests.