목차

JPA 2.1

Entity Graph

Named Query

Bulk update/delete

JPQL

funcntion 으로 native function 호출

dialect 등록

public class MyPostgreSQL9Dialect extends PostgreSQL94Dialect {
 
	public MyPostgreSQL9Dialect() {
		super();
		registerFunction("calculate", new StandardSQLFunction("calculate"));
	}
}

JPQL 에서 호출

Author a = em.createQuery("SELECT a FROM Author a WHERE a.id = function('calculate', 1, 2)", Author.class).getSingleResult();