package com.chantha.springdemo.repositories;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.chantha.springdemo.model.Food;

public interface FoodRepository  extends CrudRepository<Food, Long>{

	@Query(value="SELECT * FROM tbfood ORDER BY id DESC LIMIT 12",nativeQuery=true)
	List<Food> findFoodLimit();
	

}
