execution « Query « JPA Q&A





1. How to stop session to save onsaved objects during query execution?    stackoverflow.com

I have problem with session and query execution, please see code below.

class A implements Lifecycle{
    public boolean onUpdate(Session session){
        Query test=session.createQuery("select ...

2. How to stop session to save unsaved objects during query execution?    stackoverflow.com

I have problem with session and query execution,please see code below.

class A implements Lifecycle{

 public boolean onUpdate(Session session){
     Query test=session.createQuery("select * from Unknown");
     ...

3. Seeking solution for Entity package name clash with hibernate query translation and execution    stackoverflow.com

Following is the situation. I have my Entity classes whose root package is 'in'. Now when I execute a query in which I wish to have a cross-join (cartesian product), the Hibernate ...

4. ActionQueue execution order    forum.hibernate.org

What are you trying to accomplish with your change? The one thing that springs to mind is a scenario we bump into from time to time where we want to clear a collection and then insert new records into it but then run into unique index violations since the inserts happen prior to the deletes. If you feel strongly about your ...

5. outer-join with query execution    forum.hibernate.org

We are looking into the impact of outer-join on the quantity and quality of the SQL generated by Hibernate. Outer-join configuration worked, as documented, for loading of individual objects and queries built by Hibernate Criteria interface. Outer-join configuration does not make a difference for the top-level object and its direct references, when HQL query is executed, unless one explicitly mentions joins ...

6. Help with Native SQL query execution    forum.hibernate.org

7. deleting secondary object after query execution.    forum.hibernate.org

I am facing very strange problem. My Search Command is in transaction context, The search result has one to many relation ships Like User ----> UserPermission Hibernate get all Users and its Permission, Immediately it clears the Permissions for the user Since this is in transaction context, It also removes the permission from table. Please help me to understand this problem ...

8. auto-save on query-execution    forum.hibernate.org

Hey, im quite new to hibernate and got a problem. In example i have a table with some rows that are stored persistent by hibernate. I get the objects by a "public List getAll()"-method. This one is execution something like this: Code: Session s = SessionFactory.openSession(); Transaction tx = s.beginTransaction(); Query query = getSession().createQuery("SELECT o FROM AS o"); List result ...

9. Order of the execution of the queries resukting in org.hiber    forum.hibernate.org

We have the following hierarchy in the business model: A has an association with B and C. In the database: B holds the FK of A and C holds the FK of A. We are facing a problem when the operation should result in the DELETE of the entire hierarchy. This problem occurs ONLY AT TIMES AND NOT ALWAYS. Probelm Defn: ...





10. Query execution times returned by QueryStatistics    forum.hibernate.org

Newbie Joined: Tue Aug 03, 2004 11:54 am Posts: 3 Hello: I am trying to figure out the execution time required to execute an SQL query and get the result set from the Database. Basically, I am using HQL. However, I need to know the time hibernate took to execute the resulting SQL and retrieve the result set. I executed the ...

11. Query execution causes java.rmi.UnmarshalException    forum.hibernate.org

Hello All, In my machine JBoss running as a service . Hibernate version used is : Hibernate3 My bean contains code to execute a hibernate query Code in the bean is Code: String strQuery = "SELECT tab.distinguishedName from testquery.CUSMUser tab"; Session session = HibernateUtility.getSession(); ...

12. \ ( Backslash Problem) with Hibernate query execution.    forum.hibernate.org

Hi, We are using the Spring with Hibernate to develop the application. The problem we got with the execution of hibernate query. Problem occurs when the user enters \ in any text field and the same data is passed to hibernate. This requires bringing down jboss and bringing it up. The following stack trace shows the error .. 21:13:24,088 WARN [JDBCExceptionReporter] ...

13. How to improve the execution time of this query    forum.hibernate.org

Regular Joined: Wed Oct 15, 2008 6:59 am Posts: 103 Location: Chennai Hi Friends! I am new to hibernate. now i am working in hibernate enhancement project. For this project we are using MyEclipse 5.5 and MySQL 5.0. where i am using HQL queries to retrieve data from mysql database. the code like as Code: public String[] checkSecurityCode(String code){ ...

14. Query execution delay in class org.hibernate.AbstractBatcher    forum.hibernate.org

Author Message AceFrehley Post subject: Query execution delay in class org.hibernate.AbstractBatcher Posted: Thu Jan 29, 2009 3:50 pm Newbie Joined: Tue Jan 27, 2009 12:43 pm Posts: 16 I have an 8-9 second performace delay with the following query test case and Hibernate configuration. Please note that the table contains over 5M rows, and is accessed via a DB ...

15. Hibernate Query Execution    forum.hibernate.org

This is my java code. Public class CustomerProfile { public static Logger logger = Logger.getLogger(CustomerProfile.class); public static void main(String[] args) { CustomerProfile custProfile = new CustomerProfile(); CustomerMaster cMaster = new CustomerMaster(); cMaster = custProfile.customerQueryExecution("N2C"); logger.debug("No: "+cMaster.getCmCustNo()); Iterator itr = cMaster.getPhoneAccsCollection().iterator(); while(itr.hasNext()) { PhoneAccs pma = (PhoneAccs) itr.next(); PhoneAccs acc = new PhoneAccs(); PhoneList pl = new PhoneList(); pl.setPlPhNo(pma.getPmaPhNo().getPlPhNo()); acc.setPmaPhNo(pl); acc.setPmaEqupCode(pma.getPmaEqupCode()); logger.debug("PNO: ...

16. Best way to measure execution time for all HQL queries    forum.hibernate.org

Hi everyone, I'm trying to intercept all HQL queries for a web application using Spring in order to measure their execution time. I already know about logging the SQL statements (using hibernate.show_sql=true + log4j), but logging the HQL statements before being compiled into SQL would be really nice. I also know about the "comment" feature for a given Query, but it's ...





17. PostUpdateEventListener and query execution    forum.hibernate.org

Hello, all! I've got a problem with post-update event and execution of a query in the same session. I want to get list of objects after update occured. The code is: Code: public class VendorUpdateEventListener implements org.hibernate.event.PostUpdateEventListener { public void onPostUpdate(PostUpdateEvent event) { if(event.getEntity() instanceof Vendor){ ...

18. Reusing Session with Native Query Execution    forum.hibernate.org

I am working on a web application using hibernate and spring. We are using spring for managing transactions. Our application uses native queries heavily along with Hibernate queries. Below is code in a DAO how we execute it: Session hibernateSession = getSession(); myList = hibernateSession.createSQLQuery(query).list(); hibernateSession.flush(); hibernateSession.close(); As shown in above code every time the query executes new session is created ...