Reply
페이지 정보
본문
package web.domain;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Index;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.*;
@Entity
@Getter
@ToString //exclude 제거
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "Reply", indexes = {
@Index(name = "idx_reply_board_bno", columnList = "board_bno")
})
public class Reply extends BaseEntity {
@Id // primary key
@GeneratedValue(strategy = GenerationType.IDENTITY) // auto_increment
private Long rno;
@ManyToOne(fetch = FetchType.LAZY)
private Board board;
private String replyText;
private String replyer;
}
- 이전글● 테스트 코드와 fetch 속성 ( Board 객체 출력 추가 ) 24.06.20
- 다음글ReplyRepositoryTest 24.06.20
댓글목록
등록된 댓글이 없습니다.