Eager load guest for booking list
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
This commit is contained in:
@@ -2,12 +2,15 @@ package com.android.trisolarisserver.db.repo
|
||||
|
||||
import com.android.trisolarisserver.models.booking.Booking
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
import org.springframework.data.jpa.repository.EntityGraph
|
||||
import java.util.UUID
|
||||
|
||||
interface BookingRepo : JpaRepository<Booking, UUID> {
|
||||
fun findByPropertyIdAndSourceBookingId(propertyId: UUID, sourceBookingId: String): Booking?
|
||||
fun existsByPropertyIdAndSourceBookingId(propertyId: UUID, sourceBookingId: String): Boolean
|
||||
fun countByPrimaryGuestId(guestId: UUID): Long
|
||||
@EntityGraph(attributePaths = ["primaryGuest"])
|
||||
fun findByPropertyIdAndStatusInOrderByCreatedAtDesc(propertyId: UUID, status: Collection<com.android.trisolarisserver.models.booking.BookingStatus>): List<Booking>
|
||||
@EntityGraph(attributePaths = ["primaryGuest"])
|
||||
fun findByPropertyIdOrderByCreatedAtDesc(propertyId: UUID): List<Booking>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user