Skip to content

Commit

Permalink
feat: LAZY 옵션 추가 (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeseongDev authored Jul 9, 2021
1 parent 40ec428 commit 3014db8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.darass.darass.project.domain.Project;
import com.darass.darass.user.domain.User;
import javax.persistence.FetchType;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -22,11 +23,11 @@ public class Comment {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn
private User user;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn
private Project project;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.darass.darass.project.domain;

import com.darass.darass.user.domain.User;
import javax.persistence.FetchType;
import lombok.AllArgsConstructor;

import javax.persistence.Entity;
Expand All @@ -25,7 +26,7 @@ public class Project {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@ManyToOne
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn
private User user;

Expand Down

0 comments on commit 3014db8

Please sign in to comment.