spring data jpa inheritance repository code example
Example 1: spring data jpa inheritance repository
@Transactional
public interface SpecialEquipmentRepo extends AbstractRepository{
}
Example 2: spring data jpa inheritance repository
@NoRepositoryBean
public interface AbstractRepository
extends CrudRepository{
@Query("select e from #{#entityName} as e from equipment where e.name = equipmentName")
T findEquipmentByName(String equipmentName);
}