Eager-load amenities when fetching room type
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
This commit is contained in:
@@ -6,6 +6,7 @@ import org.springframework.data.jpa.repository.JpaRepository
|
|||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|
||||||
interface RoomTypeRepo : JpaRepository<RoomType, UUID> {
|
interface RoomTypeRepo : JpaRepository<RoomType, UUID> {
|
||||||
|
@EntityGraph(attributePaths = ["property", "otaAliases", "amenities"])
|
||||||
fun findByIdAndPropertyId(id: UUID, propertyId: UUID): RoomType?
|
fun findByIdAndPropertyId(id: UUID, propertyId: UUID): RoomType?
|
||||||
fun findByPropertyIdAndCodeIgnoreCase(propertyId: UUID, code: String): RoomType?
|
fun findByPropertyIdAndCodeIgnoreCase(propertyId: UUID, code: String): RoomType?
|
||||||
@EntityGraph(attributePaths = ["property", "otaAliases", "amenities"])
|
@EntityGraph(attributePaths = ["property", "otaAliases", "amenities"])
|
||||||
|
|||||||
Reference in New Issue
Block a user