package com.chantha.jdbc.jpa.repo import com.chantha.jdbc.jpa.model.Product import org.springframework.data.jpa.repository.Query import org.springframework.data.repository.CrudRepository import org.springframework.stereotype.Repository @Repository interface ProductRepo : CrudRepository{ @Query("SELECT * FROM product INNER JOIN order_detail ON (product.product_id=order_detail.product_id)" , nativeQuery = true) override fun findAll(): MutableIterable @Query("SELECT * FROM product",nativeQuery = true) fun readAllRecord():List }