You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the contribution! A few things to fix before we can merge.
Missing key field : this is the most important one, it's how clients identify and evaluate flags. Add public String key; with @Column(unique = true, nullable = false).
Wrong base class : PanacheEntity gives a Long id, this project uses UUID. Extend PanacheEntityBase instead and define the id field manually with @GeneratedValue(strategy = GenerationType.UUID).
Fields should be public : Panache works with public fields, private fields won't behave as expected here.
Add @Table(name = "flags") on the class and @Column(nullable = false) on required fields.
Commit message : please follow conventional commits like feat: create Flag JPA entity
The @PrePersist and @PreUpdate logic is correct, nice work on that!
Thanks for the contribution! A few things to fix before we can merge.
Missing key field : this is the most important one, it's how clients identify and evaluate flags. Add public String key; with @Column(unique = true, nullable = false).
Wrong base class : PanacheEntity gives a Long id, this project uses UUID. Extend PanacheEntityBase instead and define the id field manually with @GeneratedValue(strategy = GenerationType.UUID).
Fields should be public : Panache works with public fields, private fields won't behave as expected here.
Add @Table(name = "flags") on the class and @Column(nullable = false) on required fields.
Commit message : please follow conventional commits like feat: create Flag JPA entity
The @PrePersist and @PreUpdate logic is correct, nice work on that!
All of these were added, as well as the separation between the id and uuid attributes in order to have more performant indexing at the database level while maintaining security.
'key' field is still missing, this was flagged in the first review too. Please add public String key; with @Column(name = "key", nullable = false, unique = true).
On the id approach, the dual Long id + UUID uuid pattern makes sense for indexing but it's not the convention this project follows. Let's stick with a single UUID primary key to keep things consistent:
Fields still need to be public. Panache won't work correctly with private fields. This one's been mentioned before so want to make sure it's not missed again.
The PanacheEntityBase, @Table, and column constraints are all good now though, nice work on those!
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
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.
No description provided.