-
Notifications
You must be signed in to change notification settings - Fork 0
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
Permission relationship #19
Conversation
|
||
@Entity | ||
@Setter |
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.
It's not necessary to use annotation getters and setters, If you use the annotation data
PR OK. But there is a conflict that need to be solved before I can merge your code. Thanks!! |
@Data | ||
@EqualsAndHashCode(callSuper = false) | ||
public class Permission { | ||
|
||
@Id | ||
@GeneratedValue |
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.
It is better to make the generation method explicit to make sure it is unique, like: @GeneratedValue(strategy = GenerationType.IDENTITY)
import org.springframework.data.repository.CrudRepository; | ||
import org.springframework.data.repository.PagingAndSortingRepository; | ||
|
||
public interface PermissionRepository extends CrudRepository<Permission, String>, PagingAndSortingRepository<Permission, String> { |
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.
If permission has Long as identifier, then the repository should use Long as identity type instead of String
relationship of the permission class