-2
I am using JPA and Hibernate and encountering difficulties regarding querys errors. I wonder if there is a specific JPQL library? and what are necessary for projects to sound this profile.
-2
I am using JPA and Hibernate and encountering difficulties regarding querys errors. I wonder if there is a specific JPQL library? and what are necessary for projects to sound this profile.
1
It is a platform-independent object-oriented query language defined as part of the Java Persistence API (JPA).
As a specification, we don’t have to bring a specific lib, it’s already in spec.
It is a framework that allows you to build type-safe SQL queries for various backends including JPA, Mongodb and SQL in Java.
Instead of writing queries like inline strings or externalizing them into XML files that are built through a fluent API.
Example with Querydsl
QCustomer customer = QCustomer.customer;
JPAQuery query = new JPAQuery(entityManager);
Customer bob = query.from(customer)
.where(customer.firstName.eq("Bob"))
.uniqueResult(customer);
It’s that simple, and this might be a good option for you to make your queries in JPA. Follow the link from his website:
Browser other questions tagged hibernate query jpa-2.0
You are not signed in. Login or sign up in order to post.
Brother, I’m not interested in a new query syntax. would like to know if in the libraries of the Hibernate provider would have any need to support JPQL.
– Marcos Sousa
As a specification, we don’t have to bring a specific lib, it’s already in spec.
– guiandmag