Eager-load amenities when fetching room type
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s

This commit is contained in:
androidlover5842
2026-01-27 04:06:32 +05:30
parent a0a9ce4d31
commit 3a8f871d7d

View File

@@ -6,6 +6,7 @@ import org.springframework.data.jpa.repository.JpaRepository
import java.util.UUID
interface RoomTypeRepo : JpaRepository<RoomType, UUID> {
@EntityGraph(attributePaths = ["property", "otaAliases", "amenities"])
fun findByIdAndPropertyId(id: UUID, propertyId: UUID): RoomType?
fun findByPropertyIdAndCodeIgnoreCase(propertyId: UUID, code: String): RoomType?
@EntityGraph(attributePaths = ["property", "otaAliases", "amenities"])