 12 | I prefer to keep custom JPQL named queries in an external file, e.g. orm.xml, rather than in the entity classes, for example:
query name= "DataValue.deleteByCapabilityAndCreationtime">
<query>delete from DataValue d
where d.capabilityId = :capabilityId |
 12 | Hi, I have a query similar to this one:
select
person.name,
person.surname,
...
...
from ... of this query (running with ObjectDB) takes about 10-12 seconds. If i remove ANY 5 left joins, query execution time drops to about 50 milliseconds. Adding a new left join on remaining 8 slows down query |
 12 | Hi, i am having troubles creating criteria querys for Calendar objects. As far as I ... got such methods, but i dont know how to use those in my query. JPA supports 3 temporal types: java ... . Anyway, the following example demonstrates criteria queries with Calendar. The usual comparison methods |
 12 | 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 concatenating ... do you suggest? The query string with parameter values embedded, replacing the parameter names? I think |
 12 | understand that making a query just on entity.id.field1 is efficient. Of course, making a query ... is: what about making a query just on entity.id.field2? I suppose it will not be an efficient query ... indexed. Accordingly queries on field1 (and on both fields) will be fast, and queries on field2 |
 12 | query gets no items: SELECT i FROM Item i WHERE :label1 MEMBER OF item.labels AND :label2 MEMBER OF item.labels Is it a bug or JPQL query is wrong? Best regards, Pablo. This seems to be the result of how JPQL queries are converted into SQL like syntax before executing. MEMBER OF is implemented using |
 12 | > query = em.createQuery("SELECT m FROM ObjectDbMessagePayload m WHERE m.id = :id", ObjectDbMessagePayload.class);
query.setParameter("id", msg.getId());
List loaded = query ... well (see below). Interestingly the exception is thrown from the find method rather than the query. The application |
 12 | How write a query in JPA2 with LEFT JOIN on INNER JOIN?
select a.description, a.id, p1 ... a, action_profile ap1, profile p1, ... and add the constraints in the WHERE clause. But actually your query ... , this is my critera query:
CriteriaBuilder cb = entityManager.getCriteriaBuilder();
CriteriaQuery |
 12 | is the producer from DB (based on a query) and I would like to speed it up. I have tried using several entity ... . each query in a thread is running simultaneously - but it looks sometimes the "query threads ... it is coming from some ObjectDB low level I/O settings? Any help on how to speed up query by doing |
 12 | Hello, i'm new to ObjectDB and want to create a query which sums up the product categories ... categoryName Expected query outcome: SupplierName Category1_Count Category2_Count Supplier1 5 13 Supplier2 3 7 I tried to do this with a query method: select s.supplierName, s |