Ignore:
Timestamp:
01/04/24 09:07:47 (11 months ago)
Author:
gjoko kostadinov <gjokokostadinov@…>
Branches:
master
Children:
e8999eb
Parents:
1413ee2
Message:

Fix bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/edu/gjoko/schedlr/repositories/ServiceTypeRepository.java

    r1413ee2 r53765dd  
    11package edu.gjoko.schedlr.repositories;
    22
    3 import edu.gjoko.schedlr.entity.BusinessType;
     3import edu.gjoko.schedlr.entity.Service;
    44import edu.gjoko.schedlr.entity.ServiceType;
    55import org.springframework.data.jpa.repository.JpaRepository;
    6 import org.springframework.data.jpa.repository.Modifying;
    76import org.springframework.data.jpa.repository.Query;
    87import org.springframework.stereotype.Repository;
    98
     9import java.util.List;
     10
    1011@Repository
    1112public 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);
    1219}
Note: See TracChangeset for help on using the changeset viewer.