chore: update
This commit is contained in:
@@ -19,7 +19,7 @@ public class ReviewEntity extends BaseEntity implements ReviewInterface {
|
||||
|
||||
public UUID reviewerId;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
@JoinColumn(name = "eateryId")
|
||||
public EateryEntity eatery;
|
||||
|
||||
|
||||
@@ -45,13 +45,7 @@ public class ReviewService {
|
||||
};
|
||||
|
||||
return Response.ok()
|
||||
.entity(
|
||||
ReviewEntity.find(
|
||||
"FROM ReviewEntity r LEFT JOIN FETCH r.eatery WHERE r.eatery.id = ?1",
|
||||
sort,
|
||||
eateryId
|
||||
).list()
|
||||
)
|
||||
.entity(ReviewEntity.find("eatery.id = ?1", sort, eateryId).list())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user