ObjectDB Database Search

101-150 of 200 results

Debuging query before execution

Hi, Is is possible in any way to get string representation of a query right before execution, after setting parameters? Of course it's easy to print out query string when we build it by ... implementation. What exactly do you suggest? The query string with parameter values embedded, replacing

Java FX tableview fill with an aggregated query

Dear ObjectDB, Can someone give me a tip, to make the aggregated query work. I am filling a tableview with a normal query "SELECT p From Recept p, with no problem. But when I trying to fill a tableview with an aggregated query : "SELECT SUM(getValue()) AS value ,getUnit() AS unit,getName() AS name

Query Method NullPointerException on List iteration

Hello, i'm new to ObjectDB and want to create a query which sums up the product categories ... : categoryId categoryName   Expected query outcome: SupplierName Category1_Count Category2_Count ... to do this with a query method: select s.supplierName, s.countCategory("category1") as Category1, s.countCategory

Server closes if large query runs out of memory

;the objectdb server can run out of memory and stop if a query deals with too many objects. This isn't ... of Java heap space in any scenario. Regarding a query that returns too many objects, consider limiting the number of result objects . If you must support very large query result sets, check the temp

how explorer queries work

i'm curious as to how the explorer is able to execute queries when its obviously not aware ... to execute somewhat generalized queries and i won't know what classes are in the object model ahead ... need the classes for running ordinary queries . However, if you use user defined methods in queries

wrong query result

Hi we have a problem with queries , database is returning wrong results. These are the queries we run from ObjectDB explorer. Query 1 - SELECT MAX(e.generisaniID) FROM AktImpl e – returns string (from field e.brojAkta) although field generisaniID is of type long. Query 2 - select e.idRecord, e

Query performance in general

of a query : so far we are not optimizing the order of conditions in the where clauses of our queries . Would it make sense to have indexed fields first and then the others, or is that something that the query compiler/optimizer is doing automatically? For example, Entity TestObject has fields id

version 2.8.9_06 significantly slower for queries compared to 2.8.9

create on startup and see that the queries are now around 5-10 times slower than before. see https://www.objectdb.com/forum/2845 for queries we are using hgzpincher Hans-Georg Zwicker Version 2.8.9_01 fixed an issue with queries ( issue #2858 ) but had a known query performance regression. It was fixed

Query can't see recently persisted object

and incorrectly thrown for the same "oid" query parameter on subsequent occasions ... ( name = "MyQuery.findByOid", query = "select m from MyClass m where m.oid = :oid" ) } ) @Indices ... = oid; } ... } ... TypedQuery query = mem.createNamedQuery("MyObject.findByOid", MyObject.class

Query over the keySet of a map field with collection parameter

It is possible to execute a query over a keySet of a map field with comparing to a collection parameter? Set values = new HashSet (); values.add("c2"); String query = // "SELECT e " + "FROM " + EntityParent.class.getName() + " e " + "WHERE e.map member of ?1"; TypedQuery q = em.createQuery( query

Query by array element

properties[]= new boolean[1024]; } I would like to query objects with feature '42': select me from ... This query is not supported since you cannot access arrays in queries . You can implement a method in MyEntity that wraps the array access operation and then use that method in the query . It is supported by

composite index not used in query

objectsInCharge = new ArrayList (); on running a query like select count(a) from Action a JOIN ... and a.startDate ?1)) the composite index is not used, query plan:  Step 1: Process Action ... (remark: the order of the arguments in the query does not make any difference) ? hgzwicker Hans

Query only works correctly when debug printing results

on pc) the query results are only fully read back when debug printing the result contents before ... , getters and setters, other stuff... } The query is executed in this method: private List read(String ... ); EntityManager em = emf.createEntityManager(); TypedQuery query = em.createQuery("SELECT l from

Speeding up reporting queries with size() on list

should include activity on last modified objects. The query for now looks like this: select date(insp ... Inspiration entities in database right now. With 'cold' db file execution time of this query is between 1.9 sec and 2.8 sec. On 'hot' db file  without query result in cache, execution time is between

Entity can be found by find() but not by query

(), with a query it is not always possible to get the entity, sometimes we get the entity and sometimes we don't get the entity by query . Have you an idea what happens here?   btc_es BTC EmbeddedSystems ... . Do you have another idea? btc_es BTC EmbeddedSystems In that case, maybe it is related to the query cache

Attempt to execute a query using a closed EntityManager

. com.objectdb.o.UserException - Attempt to execute a query using a closed EntityManager at com ... to execute a query using a closed EntityManager at org.apache.myfaces.view.facelets.el ... .o._PersistenceException: Attempt to execute a query using a closed EntityManager at org.apache.el

Visibility of changes in Transaction is not visible to a JPA QL Query

(which is more efficient). support Support Yes, changing the Query to FlushModeType.AUTO meant that the added items are 'visible' JFK John Francis However if I Query for an Item that I have added in the uncommitted ... of the transaction before commit in a Query ... For example if I implement the following in Singleton

Compiled Queries and Cache

objectdb.conf has options for query results and program cache.  (objectdb.conf database query -cache results and programs, https://www.objectdb.com/java/jpa/setting/database#The_ query -cache_element_ .) query .compile(); query .closeAll(); After code like above, are the query results

Getting exception while executing the Query

I have facing a problem when i am executing the query first time, Please find the stack trace ... .objectdb.jdo.JdoQuery.execute(JdoQuery.java:720) I am using the following code to execute the same Query query = pm.newQuery(logQuery.getQueryClass(), ""); query .setOrdering(logQuery.getOrderString

Async query ObjectDb

1. Is it possible to run async objectDb queries for long time operations and stop them if it necessary? 2. Is it possible to stop sync ObjectDb query from another thread for long time operation ... /Statement.html Harman Alexander Golyshkin In JPA query execution is always synchronous

JPA vs JDO - which is more efficient for OneToMany queries?

you have to query the database. dmoshal David Moshal JPA and JDO have similar capabilities and the following ... /entity/fields#Inverse_Fields . A query will still be executed (i.e. navigation from Customer to Order will run an automatic query ), but your code will be cleaner. When using ObjectDB

Query Execution on parallel threads don't lead to performance improvements

Hello, we want to execute querys in parallel threads on the same entity type in order to increase ... the query performance with parallel threads? We use the ObjectDB as an embedded database ... are fine. A parallel query execution doesn't necessarily improve performance, if the serial execution

Query perfromance problem

; }   try {    logger.debug("Executing query ");    prodList = icQuery.setFirstResult(start).setMaxResults(count).getResultList();    logger.debug(" Query executed ... with paging order in given way. Now, when running this query with sort column set to 'id', it takes

Problem with queries on lists with reverse mapping

Hi, In version 2.4.2, when an object in a list is reversed mapped to the owning object, queries are returning objects of types that were not specified in the query . In the attached example the last test fails because the query returns both TeamA and TeamB objects where only TeamA was specified in

Join query problem with new statetment

when using query with join. The query code is: TypedQuery inspirationQuery = em.createQuery(    ... trace the exception might not be related to using NEW . There is an unexpected state during query ... were from the beginning tagged as @Entity and I don't think it was ever changed. I've changed this query

@ElementCollection query returning extra result per element in collection

: 2.2.8_06   Willks William It seems as a bug in an ObjectDB query optimization - use an explicit DISTINCT as a workaround until a fix is released: query .select(companyRoot).distinct(true ... am not sure that this is a bug. Your query defines an implicit JOIN (on branches), so selection

URGENCY, or in query does not report any objects on first operand having no results

this query does not return any objects even there are lot of objects to return for the second ... if the query is changed to select a from Action a where (a.state = 3 or a.state = 2) and a.type = 0 ... is not working at all the query plan is: Query plan 1/2 description

JPA-Query does not lead to any result

Hi, we have a database with a Entitiy inside which we want to fetch with a query . Normally that works without a problem, but in case of this database that query does not have any results. Can anyome ... are two databases, one where the query has a result and one where the query does not has any results

no query result

we are using this query select a from Action a where (a.state = 2 or a.state = 3) and a.type = 0 and a.transferred = 0 and see a very strange query plan, an index scan for an entry that is not used at all in the query , and according to that plan there is no result: Query plan 1/2 description

Nested Collection Query

the JPA query language does not have a method for querying the content of this structure. You can still query it by running your own method in the query (which is another extension of ObjectDB

Entity Type is not found (error 301) in Query

, HibernateJAP, EclipseLink For ObjectDB there is one query in following method, where the full qualified class ... a persistence unit or introduce the class to ObjectDB before the query , for example by:     ... - fast JPA impl and fast support!  You are right, the first query is invoked when the database

InternalError on query of empty database

Hi, I have reasons for sometimes trying to query the database before anything has been created ... something like javax.persistence.EntityNotFoundException? Either that, or is there some way to query ... Support Hi, Query I'm running is: SELECT DISTINCT $1 FROM CDI $1 JOIN $1.attributeList $2 JOIN $1

Are Queries in ObjectDB Multithreaded ?

Greating again ObjectDB team, Will ObjectDB query engine use multithreading whenever possible ... that can split many types of operations between threads, including operations that are part of query execution ... . However, if your application use multiple threads that execute multiple queries against ObjectDB simultaneously

Retrieve data of all entity classes in a single query

for all classes TypedQuery query = em.createQuery(tmpQuery, Athlete.class); // I want to avoid this List results = query .getResultList(); for(Athlete result : results) { System.out.println(result.Code ... ); } } Is there a way to get data of all classes without writing down 10 different queries (i.e. using the for loop

First query before any of the object has been stored

I have some code that, before writing an object via ObjectDB makes a query to ensure the new ... of that object have been stored, the query generates an exception.  I'd been expecting  ... if any of an object has been stored yet? jshaffstall Jay Shaffstall The query fails

Query on Embedded Primary Key?

with the query below - the query seem to work fine for other field (in the code = primkeycopy). The error ... ;      TypedQuery query = em.createQuery("SELECT mif.primkeycopy FROM OBJ2 mif", Primkey2.class);         List ret = query .getResultList

jakarta.persistence.criteria.Root

, TupleElement A root type in the from clause. Query roots always reference entities. Since: Jakarta ... a compound selection. Modifications to the list do not affect the query . Inherited from Selection Returns ... the query . Inherited from FetchParent Returns: fetch joins made from this type. Since: Jakarta Persistence

jakarta.persistence.TypedQueryReference

: - an upper bound on the result type of the query A reference to a named query declared via the NamedQuery ... .0 String getName () The name of the query . Since: Jakarta Persistence (JPA) 1.0 Class getResultType () The result type of the query . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.Tuple

the elements of a query result tuple. See Also: TupleElement Since: Jakarta Persistence (JPA) 2.0 Public ... - if tuple element does not correspond to an element in the query result tuple. Since: Jakarta ... does not correspond to an element in the query result tuple or element cannot be assigned

JQL-Update Queries fails with activated L2-Cache

When using JQL-Update Queries it is basically not working without calling entityManager.clear ... - Query and fetching Entities afterwards from database. Expected result: Getting changed Entities from ... using UPDATE- Query , calling entityManger.clear() and fetching Entities afterwards from database

Querying error - java.lang.ClassCastException: com.objectdb.o.STV

I'm getting the ClassCastException below when querying objects. As yet I haven't been able to track down the exact circumstance in which it occurs - saving and querying objects works fine ... (Unknown Source) at rbccm.felix.gridservice.admin.dao.SimpleWorkflowInstanceDao. query (Unknown Source

Error 990 when querying a class with persistence-capable-superclass

.java:143 is the last line of the following: Query query = pm.newQuery(); query .setResult("count(this)"); query .setClass(myClass); return (Long) query .execute(); All queries (eg ones with parameters ... , and the cause is unknown. It happens during cleanup of query execution in a finally block. Maybe

Removed entities can be found by query in the same transaction

(). Afterwards the entity can be load again by query although the resulted entity have an attribute ... . Apparently the query was directed to the wrong snapshot. Are you sure that this bug exists in 2.7.4 ... a particular transaction. When changes are flushed, a snapshot is generated, and further queries in

Update query null error

%" and objectsInCharge.nodePath like "%MARAS%" both result in: Query Execution Error ===================== null Query ... Could you please demonstrate it with a query that has results with the sample database that you sent us, as this specific query returns no results. support Support try that: select a from Action

Update query bug

Some code. Problem in UPDATE query . TypedQuery query = (TypedQuery ) em.createQuery("SELECT t FROM Person p JOIN p.transports t WHERE p.personalCode = :code"); query .setParameter("code", personalCode); List list = query .getResultList(); List temp = new Vector (); temp.add((Transport

NoResultException: No matching results for a unique query

query " when modifying my already persisted entities within a transaction. I cannot replicate ... Adam The stack trace indicates a normal situation of executing a query that has no results, so more details are needed to understand the problem. You wrote that this happens when a query is run

2.9.x query issue with @Unique constraint

Query doesn't return results in versions 2.9.x when there's a unique property in (where/and .. or ... for :userName parameter 2.8.9 Query plan description ============================ [Step 1] Scan type ... =:userName)). [Step 4] Apply selection and prepare final results.   2.9.x Query plan description

query.getResultList() throws ClassCastException

; @Index(members={"x","y"}) Then when I run the following query :     TypedQuery query = em ... only on "x" Use an OR in the query instead of AND [ObjectDB 2.3.0_04] Unexpected exception (Error 990 ... (because it would consume less RAM). You can improve query performance by retrieving field values rather than entity

Query Execution Error

This query SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 LEFT ... ')).contracts.active=true)))) results in " Query Execution Error===null" in Explorer and Internal Exception ... which has worked just fine before!!! See this more simple query (no collection and the such) SELECT DISTINCT $1

NPE on em.createQuery(query).getResultList()

the exception by sending a new entity object with no allocated ID (before commit) as a query ... .persist(e); // entity with no ID as a parameter         Query query ... MyEntity e WHERE e = :p");         query .setParameter("p", e