About named queries

forum_thread

native sql queries

Is there a way to run native SQL queries in ObjectDB? I would guess 'no' since it is an oodbms, but I did not find the answer in the documentation. An attempt: Query q = em.createNativeQuery("select * from person"); Result: ... Is there a way to run native SQL queries in ObjectDB? I would guess 'no' since it is an oodbms, ... 12:20 Native SQL queries are not supported because there is no underlying RDBMS. But since SQL ...

 
issue

InternalException when using MEMBER OF on a large list in a query

Hello, we get when executing a query with MEMBER OF on a large list the following InternalException: Caused by: com.objectdb.o.InternalException: merge2 com.btc.ep.coverage.bl.internal.dmos.CoverageRecordImpl:null => merger[2850057]-missing:223 at com.objectdb.o.PBI.B(PBI.java:124) at com.objectdb.o.PBI.q(PBI.jave:97) at com.objectdb.o.OBI.Vp(OBI.java:244) (... more see attached Image) Our query looks like this: ... bug (so no need to repair it with the Doctor) but various queries can fail with versions of ObjectDB before the new build. Note ... database files, memory usage of the JVM and efficiency for queries. We already need the key before the entities are persisted so ...

 
issue

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

(JPA2 support getting better but still not quite there, excellent progress regardless). Difficult to see what's going on because of obfuscation, but it didn't look like this exact issue was reported yet (seemed to differ from the other reported and fixed NPEs): Bug Version: 2.2.7 Priority: Normal Status: Fixed Replies: 1 Type:  Bug ...

 
forum_thread

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 concatenating many strings, but even then we miss attributes. ... query string with embedded values would be nice for simple queries with up to 3 parameters. But for more complicated queries with many parameters this string could be too long. On the ...

 
forum_thread

Query in JPA2 with LEFT JOIN on INNER JOIN

select a.description, a.id, p1.description, p2.description,p3.description from action a left join action_profile ap1 on ap1.id_action=a.id inner join profile p1 on  ap1.id_profile=p1.id  and p1.name='?' left join action_profile ap2 on ap2.id_action=a.id inner join profile p2 on  ap2.id_profile=p2.id  and p2.name='?' where a.id =?;   Thanks   #1 2013-01-23 13:29 How write a query in JPA2 with LEFT JOIN on INNER JOIN? SELECT a . description , a . id , p1 ...

 
issue

Large query parameter - out of memory

I have an entity object composed of an id, large data in the form of a string and the hashcode of the string as an index. The attached test saves 2000 of these objects, writing the data to a txt file as it goes. It then loops through the data from the file and queries for the entity id based on the data hashcode and the data itself. ... it goes. It then loops through the data from the file and queries for the entity id based on the data hashcode and the data itself. ... at a time and am only querying for the id. After about 300 queries the test throws an out of memory exception so I assume the query data ...

 
forum_thread

JBOSS AS7 7.1.1 - Entity not persisted and createNamedQuery fire exception

I'm trying to have the guestbook example running in the following environment: jboss as 7.1.1 final oracle jdk 1.7.0_04 maven 3.0.4 objectdb 2.4.0_04 installed as a module of jboss No IDE is used for building the Guestbook.war only maven.   My GuestDAO code is as follows: ... } I get an exception when I want to use a named query @ NamedQueries ( { @ ... (MSC service thread 1-4) JNDI bindings for session bean named GuestDao in deployment unit deployment "Guestbook.war" are as ...

 
forum_thread

java.lang.ClassCastException in query results

I have a simple object stored in a ObjectDb file Stadium Name (java.lang.String) Capacity (int) City (java.lang.String)   When i run the following code i get the ClassCastException in the "for (Stadium result : results)" line #1 2014-08-10 18:12 I have a simple object stored in a ObjectDb file Stadium Name (java.lang.String) Capa ...

 
forum_thread

possible index required for improving query performance

Hi,   I have the following entity class:   @Entity @Table @Indices({ @Index(members={"relationshipType", "party"}), @Index(members={"relationshipType", "otherParty"}),     @Index(members={"relationshipType"}) }) @XmlRootElement public class Relationship implements Comparable<Relationship> { #1 2012-02-14 22:29 Hi, I have the following entity class: @ Entity   @ Table @ Indi ...

 
api-jpa

getParameterValue(name)

Return the value bound to the named parameter.(Method of javax.persistence.Query)