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

Enhance specification #170

Merged
merged 80 commits into from
Feb 21, 2024
Merged

Enhance specification #170

merged 80 commits into from
Feb 21, 2024

Conversation

otaviojava
Copy link
Contributor

@otaviojava otaviojava commented Feb 19, 2024

Changes

  • Define the entity
  • Define the basic fields
  • Define the annotations
  • Put sample annotation
  • Include the annotations for compatibility with Jakarta Data
  • Remove the specializations of templates outside the specifications.

The scope of this PR is to enhance the specification and better describe the annotations we have at Jakarta NoSQL. Furthermore, we focus on the Template interface.

If the team agrees with this enhancement, we can go further to the TCK.

Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
…mn annotation at keyvalue

Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Signed-off-by: Otavio Santana <[email protected]>
Copy link
Contributor

@njr-11 njr-11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice alignment of entity-related annotations with Jakarta Persistence.
I added a number of review comments which are mostly minor details/grammar.

api/pom.xml Outdated Show resolved Hide resolved
api/src/main/java/jakarta/nosql/AttributeConverter.java Outdated Show resolved Hide resolved
api/src/main/java/jakarta/nosql/Id.java Outdated Show resolved Hide resolved
* }
* }</pre>
*
* @return the entity ID name
*/
String value() default "_id";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really want to default the id to _id rather than the name of the annotated field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to make it as close to Jakarta Persistence as possible.
Thus, I can remove and allow the annotation by column.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, mostly of the NoSQL database uses this "_id"

README.adoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/chapters/api/annotations.adoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/chapters/api/annotations.adoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/chapters/api/annotations.adoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/chapters/api/annotations.adoc Outdated Show resolved Hide resolved
spec/src/main/asciidoc/chapters/api/entity.adoc Outdated Show resolved Hide resolved
@otaviojava
Copy link
Contributor Author

Nice alignment of entity-related annotations with Jakarta Persistence. I added a number of review comments which are mostly minor details/grammar.

Nice, this way we can enhance even more the Jakarta Data, mainly at the Polymophism (Polymorphism)/ Inheritance Jakarta

@dearrudam
Copy link
Contributor

@otaviojava it's nice to see annotations like @DiscriminatorColumn and @DiscriminatorValue. Both will help developers implement the single table inheritance strategy, which strategy that is commonly implemented when they're working with NoSQL databases like AWS Dynamo DB.

@njr-11
Copy link
Contributor

njr-11 commented Feb 21, 2024

FYI - just in case they were missed in the large amount of comments, there are 2 very minor suggested changes pending. One is a fix to a copyright year and the other is a grammar correction.

@otaviojava
Copy link
Contributor Author

FYI - just in case they were missed in the large amount of comments, there are 2 very minor suggested changes pending. One is a fix to a copyright year and the other is a grammar correction.

Thank you @njr-11. I fixed it all.
There is a lot of work to do here, but with this sync with JPA, we are going on the right path.

@otaviojava otaviojava merged commit f3a3d9c into main Feb 21, 2024
5 checks passed
@otaviojava otaviojava deleted the enhance-documentation-nosql branch February 21, 2024 15:56
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.

3 participants