CarsRepository.java 445 Bytes
package com.bsth.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.bsth.entity.Cars;

@Repository
public interface CarsRepository extends BaseRepository<Cars, Integer>{

	@Query(value="select s from Cars s where s.id in(select e.cl.id from CarConfigInfo e where e.xl.id = ?1) ")
	List<Cars> findCarsByLineId(Integer lineId);
}