About named queries

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 ...

 
forum_thread

Order in WHERE Clause affects behaviour on DATE/DATETIME columns

Quick example:  public class MyClass { @Column(name = "myText") String myText; @Temporal(TemporalType.TIMESTAMP) @Column(name = "myDate") Date myDate; } Now, when querying the db with: #1 2017-07-26 07:33 Quick example:  public class MyClass {   @ Column ( name ...

 
forum_thread

Performance issues on aggregate query

we are using this aggregate query to collect some data: ... childNodes content (you can see query plans when running queries in the Explorer). The SELECT clause in your post seems to be ... a large tree of other objects), but this is relevant for queries that return entity objects. As always, if you can provide a ...

 
forum_thread

Entity Type is not found (error 301) in Query

Overall test OpenJPA, HibernateJAP, EclipseLink and ObjectDB. No Problem with OpenJPA, HibernateJAP, EclipseLink For ObjectDB there is one query in following method, where the full qualified class name is necessary. See method code - red part Otherwise an error will occure. #1 2013-04-11 19:00 Overall test OpenJPA, HibernateJAP, EclipseLink and ObjectDB. No Problem with OpenJPA, HibernateJAP, EclipseLink ...

 
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 ...

 
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

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 ...

 
api-jpa

getParameterValue(name)

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

 
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 ...