ObjectDB ObjectDB

Internal Website Search

51-60 of 86 resultsRefresh
22

ObjectDB CRUD Examples

(); CriteriaBuilder criteriaBuilder = em.getCriteriaBuilder(); CriteriaQuery<Foo> criteriaQuery = criteriaBuilder.createQuery(Foo.class); Root<Foo> root = criteriaQuery.from(Foo.class); List<Foo> allFoo = (List<Foo>) criteriaQuery.select(root); em.getTransaction
18

Object as parameter results in exception

});   CriteriaBuilder qb = getEntityManager().getCriteriaBuilder();   CriteriaQuery<T> c = qb ... ().getCriteriaBuilder();   CriteriaQuery<T> c = qb.createQuery(managedClass);   Root<T> p = c.from ... please consider: Building the query (the CriteriaQuery and the TypedQuery) once with two parameters
16

How to convert a boolean to an int in the query?

:         CriteriaBuilder cb = em.getCriteriaBuilder();         CriteriaQuery<Integer> q = cb ... = em.getCriteriaBuilder(); CriteriaQuery<Integer> q = cb.createQuery(Integer.class ... CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Integer> q = cb.createQuery(Integer
16

Criteria Query results in a NoResultException instead of returning object

(); CriteriaQuery criteria = builder.createQuery(identityClass); Root root = criteria.from(identityClass ... to: select i from IdentityObject i where i.name = :identityObjectName My issue is that the CriteriaQuery ... versions of the CriteriaQuery and JPQL snippets: CriteriaBuilder builder = em
16

java.lang.ClassCastException: CriteriaQueryImpl cannot be cast to java.util.List

this thread. ThreaT Ashton Hogan The select method returns a CriteriaQuery instance (to be used ... a TypedQuery (or Query) instance from your CriteriaQuery and then execute the query using getResultList:     criteriaQuery.select(root);     TypedQuery<Person> query = em.createQuery(criteriaQuery
13

Query results are not up to date for entities, not primitives

) {   Root<?> root = criteriaQuery.from(type); } private <X> void select(Object object) {   ((CriteriaQuery<X>) criteriaQuery).select((Selection<X>) object); } For completeness, I'm using only super
13

Query in JPA2 with LEFT JOIN on INNER JOIN

(); CriteriaQuery<ActionProfileAdminAdvancedResponse_> cq = cb.createQuery(ActionProfileAdminAdvancedResponse_.class); CriteriaQuery<BigDecimal> profileCriteriaQuery = cb.createQuery(BigDecimal.class); CriteriaQuery<String> actionDescriptionCriteriaQuery = cb.createQuery(String.class); Root
4

javax.persistence.criteria.Subquery

that have been defined for the CriteriaQuery or Subquery itself, including any subquery roots defined as
3

Weird issue with variable naming

with CriteriaQuery.toString(). I've tried three hours to replicate it without success, all I can say ... ; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery ... CriteriaBuilder cb = em.getCriteriaBuilder();   final CriteriaQuery<Tuple> cq = cb.createQuery
2

Issue with DISTINCT Select

() of the CriteriaQuery doesn't contain any variable named $3!!! And even worse.. when debugging in eclipse which calls the .toString() of the CriteriaQuery at different points in time, it happens that we get the same ... as this causes more issues in explorer because the generated code from criteriaquery is NOT valid

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support