16 Nisan 2018 Pazartesi

JPA Root Arayüzü

Giriş
Şu satırı dahil ederiz.
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Join;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
constructor
Şöyle yaparız.
CriteriaQuery<Customer> query = ...;
Root<Customer> root = query.from(Customer.class);
join metodu
Şöyle yaparız.
// company join
Join join = root.join("company");   

Hiç yorum yok:

Yorum Gönder