2020-05-15 17:20:27 +07:00
|
|
|
package com.chantha.jdbc.jpa.repo;
|
|
|
|
|
|
|
|
import com.chantha.jdbc.jpa.model.Customer;
|
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
|
import org.springframework.data.repository.CrudRepository;
|
|
|
|
|
|
|
|
public interface CustomerRepo extends CrudRepository<Customer,Long> {
|
2020-05-17 12:25:24 +07:00
|
|
|
@Query(value ="SELECT * FROM tb_customer c INNER JOIN tb_order o ON (c.id=o.cus_id)",nativeQuery = true)
|
2020-05-15 17:20:27 +07:00
|
|
|
@Override
|
|
|
|
Iterable<Customer> findAll();
|
|
|
|
}
|