Changeset 53765dd for src/main/java/edu/gjoko/schedlr/repositories
- Timestamp:
- 01/04/24 09:07:47 (11 months ago)
- Branches:
- master
- Children:
- e8999eb
- Parents:
- 1413ee2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/repositories/ServiceTypeRepository.java
r1413ee2 r53765dd 1 1 package edu.gjoko.schedlr.repositories; 2 2 3 import edu.gjoko.schedlr.entity. BusinessType;3 import edu.gjoko.schedlr.entity.Service; 4 4 import edu.gjoko.schedlr.entity.ServiceType; 5 5 import org.springframework.data.jpa.repository.JpaRepository; 6 import org.springframework.data.jpa.repository.Modifying;7 6 import org.springframework.data.jpa.repository.Query; 8 7 import org.springframework.stereotype.Repository; 9 8 9 import java.util.List; 10 10 11 @Repository 11 12 public interface ServiceTypeRepository extends JpaRepository<ServiceType, Long> { 13 14 List<ServiceType> findAllByBusinessType_Id(Long businessTypeId); 15 16 @Query(value = "select b.businessType.serviceTypes from Business as b " + 17 " where b.owner.id = :ownerId") 18 List<ServiceType> findAppropriateBusinessTypesForBusinessByOwnerId(Long ownerId); 12 19 }
Note:
See TracChangeset
for help on using the changeset viewer.