Skip to content

Commit 866e758

Browse files
committed
(TP-111) feat: change FetchType to LAZY
1 parent 02369e5 commit 866e758

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • rentplace/src/main/java/kattsyn/dev/rentplace/entities

rentplace/src/main/java/kattsyn/dev/rentplace/entities/Property.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ NOT PUBLISHED (не опубликовано) - объявление уже пр
8282
private User owner;
8383

8484
@Schema(description = "Фотографии жилья")
85-
@OneToMany(fetch=FetchType.EAGER)
85+
@OneToMany(fetch=FetchType.LAZY)
8686
@JoinTable(name = "properties_images",
8787
joinColumns = @JoinColumn(name = "property_id"),
8888
inverseJoinColumns = @JoinColumn(name = "image_id")
8989
)
9090
private Set<Image> images = new HashSet<>();
9191

9292
@Schema(description = "Категории жилья")
93-
@ManyToMany(fetch = FetchType.EAGER)
93+
@ManyToMany(fetch = FetchType.LAZY)
9494
@JoinTable(
9595
name = "properties_categories",
9696
joinColumns = @JoinColumn(name = "property_id"),
@@ -99,7 +99,7 @@ NOT PUBLISHED (не опубликовано) - объявление уже пр
9999
private Set<Category> categories = new HashSet<>();
100100

101101

102-
@ManyToMany(fetch=FetchType.EAGER)
102+
@ManyToMany(fetch=FetchType.LAZY)
103103
@JoinTable(
104104
name = "properties_facilities",
105105
joinColumns = @JoinColumn(name = "property_id"),

0 commit comments

Comments
 (0)