Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
@Entity
@Table(name = "user")
@Getter
@Access(AccessType.FIELD)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This @Access(AccessType.FIELD) annotation is redundant. The default access type for a JPA entity is determined by the placement of the @Id annotation. Since @Id is on the id field, JPA's default access strategy for this entity is already FIELD. While being explicit can sometimes be helpful, in this case it adds verbosity without changing behavior. It's generally recommended to rely on the standard JPA defaults when they fit the use case to keep the code cleaner and more concise.

@NoArgsConstructor(access = AccessLevel.PROTECTED)
@SoftDelete
public class UserJpaEntity extends BaseTimeEntity {
Expand All @@ -50,7 +51,6 @@ public class UserJpaEntity extends BaseTimeEntity {
private LocalDate birth;

@Column(name = "phone_number", unique = true)
@Access(AccessType.FIELD)
private String phoneNumber;

@Column(name = "customer_key")
Expand Down