ObjectDB ObjectDB

Internal Website Search

11-20 of 200 resultsRefresh
90

java.lang.ClassCastException in query results

result : results)" line TypedQuery<Stadium> query = em.createQuery( "SELECT Name, Capacity, City FROM Stadium s", Stadium.class); List<Stadium> results = query.getResultList(); for (Stadium result : results) { System.out.println("Name: " + result.Name + ", Capacity: " + result
89

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

This could be the result of getting query results from the cache. There is no difference between ... that updates by queries bypass the cache and may result in not being seen by queries: "Updating entity ... queries should return up to date results, if: You are using a new EntityManager (i.e. with no old
89

Iterating over large result set

of given size until whole result set is iterated. What I'm thinking about is some kind of streaming of result set from database without building whole object graph representing fetched data in application ... with one query by running the query with a hint "objectdb.result-fetch" set to "LAZY". Another option is to use
52

otherwise(result)

Method javax.persistence.criteria.CriteriaBuilder.SimpleCase Expression<R> otherwise( R result ) Add an "else" clause to the case expression. Parameters: result - "else" result Returns: expression Since: JPA 2.0
52

when(condition, result)

Method javax.persistence.criteria.CriteriaBuilder.Case Case<R> when( Expression<Boolean> condition, Expression<?> result ) Add a when/then clause to the case expression. Parameters: condition - "when" condition result - "then" result expression Returns: general case expression Since: JPA 2.0
22

Running JPA Queries

when exactly one result object is expected. Query.getResultList - for general use in any other case ... - for use when exactly one result object is expected. TypedQuery.getResultList - for general use in any ... <Country> results = query.getResultList(); Both Query and TypedQuery define a getResultList method
18

ORDER BY clause (JPQL / Criteria API)

The ORDER BY clause specifies a required order for the query results. Any JPQL query that does not include an ORDER BY clause produces results in an undefined and non-deterministic order. ORDER BY ... clause produces objects for examination and the WHERE clause selects which objects to collect as results
17

DB persist operation results are not available for another Thread/EntityManager immdiately

a query. But there are not any results available. We debugged the problem. Thread B executes the query and prints the results to the console, but there are not results. After that the thread stops ... again. And we get the expected results. Why? It is also possible to insert a Thread.sleep(1000) before executing
17

Query execution creates a wrong result

Hello, we analysed an unexpected behavior and find out that the result of an Query are wrong ... returns an expected result (one Entity). The second Query is the first Query with an additional WHERE condition. But than we get another (wrong) result. We used Version 2.6.5 and the BUG is fixed
3

[ODB1] Chapter 7 - JDOQL Queries

to boost recycling rates in Manchester approved n criteria, and iteration over the results in ... a persistent class) A filter, which is a boolean expression in a Java like syntax The query result ... is 18 or older: Query query = pm.newQuery(Person.class, "this.age >= 18"); Collection result

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