Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

writing wehere clause in repository in springboot

@Repository
@Transactional
public interface EmployeeDAO extends CrudRepository<Employee,Long> {
    List<Employee> findByEmployeeName(@Param("name") String name);      // using method
    @Query("SELECT e from Employee e where e.employeeName =:name ")       // using @query
    List<Employee> findByName(@Param("name") String name);
    @Query(value = "SELECT e from Employee e where e.employeeName =:name ", nativeQuery = true)    @ using @query with native
    List<Employee> findByNameNative(@Param("name") String name);
}
Comment

PREVIOUS NEXT
Code Example
Java :: URI/BEE problem no-1101 solution in Java 
Java :: java 8 if else in one statement 
Java :: Txt to Json in java 
Java :: como codificar pilas en java creeper 
Java :: java find nth smallest element using priority queue heap 
Java :: print character in string java 
Java :: Statement sql= clsConexion.getConexion().createStatement(); 
Java :: check java variable type using getSimpleName method 
Java :: check if combobox has specified value 
Java :: java boolean even number 
Java :: trivers json node as node type 
Java :: Java 17 not showing in linux 
Java :: how to shorten if else if and else in java 
Java :: Add items to ArrayList Using add() function 
Java :: verificar numero par ou impar jacva 
Java :: exception handling and reprompting 
Java :: how to clear scoreboard with offline players java 
Java :: java add backslash into string 
Java :: How to Implement GET and POST Requests With Java 
Java :: Give the output of the following code: int a = 10; int b = 20; String s = Integer.toString(a); String t = Integer.toString(b); System.out.println((s+t)); 
Java :: data base spring 
Java :: missingWords 
Java :: java inetaddress workaround how to get localhost secure 
Java :: compile time exception in java 
Java :: Small Change 
Java :: encode é to é java 
Java :: chemistry formula on android 
Java :: find the length of jtextfeild in java 
Java :: how to use int 
Java :: java map get value 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =