Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Atanaz Talos
Added: May 14, 2020 1:59 PM
Views: 5
Tags: no tags
  1. @Query("SELECT s FROM Student s WHERE s.age = :age and s.name = :name")
  2. public Student findUserByAgeAndNameParams(@Param("age") Integer age,
  3.                                             @Param("name") String name)
  4.  
  5. @Query(value = "SELECT * FROM pet WHERE owner_human_id > :humanAge", nativeQuery = true)
  6. List<Pet> getPetsWhichOwnerIsOlderThanGivenAge(int humanAge);