query 4 « Query « JPA Q&A





1. Envers - Queries    forum.hibernate.org

Hi, I'm using the hibernate-envers-3.4.0-SNAPSHOT.jar with Hibernate 3.3.1 Please help me out with the following queries - 1. Is it compulsory to use the AnnotationConfiguration with Envers? I have defined all my mappings in xml files and was using Configuration but i started getting ClassCastException in AuditConfiguration. 2. I tried running the Ant task to generate the schema for the audit ...

2. HIBERNATE QUERY query is looping infinitively    forum.hibernate.org

Login Register FAQ Search View unanswered posts | View active topics Board index Hibernate & Java Persistence Hibernate Users All times are UTC - 5 hours [ DST ] HIBERNATE QUERY query is looping infinitively Page 1 of 1 [ 3 posts ] Previous topic ...

3. Simple Query taking forever in Hibernate    forum.hibernate.org

Hibernate version: 3.1.3 Hello all, I realy need some help with a serious performance-problem: A simple Query (see log)... Code: [2009-01-09 11:27:34,609][DEBUG][org.hibernate.jdbc.AbstractBatcher]about to open PreparedStatement (open PreparedStatements: 0, globally: 0) [2009-01-09 11:27:34,609][DEBUG][org.hibernate.SQL]select * from ( select this_.AA_KEY as AA1_1_0_, this_.VERS_NR as VERS2_1_0_, this_.NACHNAME as NACHNAME1_0_, this_.VORNAME as VORNAME1_0_, this_.GEBURTSDATUM as GEBURTSD5_1_0_, this_.KAT_STATUS as KAT6_1_0_, this_.KAT_BEZ as KAT7_1_0_, this_.NACHNAME_UPC as NACHNAME8_1_0_, this_.VORNAME_UPC ...

4. Best Place to Store Hibernate Queries    forum.hibernate.org

Hi Guys, Can anybody tell me what could be the best way of storing hibernate queries efficiently ? As of now we are storing it in the class as Public Static final String ..but could there be any better way of doing it. We want to access the same Hql Query from differnt lcoations in our project. Any help would be ...

5. "MEMBER OF" portion of my query not working?    forum.hibernate.org

I have a many-to-many join between two entities. One is an employee class. The other is a Device class. I am trying to find the one employee who has a certain employee number and who is associated with a device. When I execute the query Code: select e from Employee e where e.employeeNumber = :employeeNumber and :device MEMBER OF e.devices I ...

6. Not sure how to write this query...    forum.hibernate.org

Hi all, Using Spring / JPA & Hibernate, with my DAOS using the getJPATemplate() method of querying my db I'm stuck designing a particular query.. What I need to do is query to create a list of objects where there is more than one occurance of an element over particular dates.. Ill show you a class structure to describe this.. class ...

7. Is this seemingly simple query possible?    forum.hibernate.org

Using the latest version of hibernate and mysql is the following query possible? Table: Name ------ Id integer auto_increment First varchar(100) Middle varchar(100) Last varchar(100) Query: I need to return a list of all distinct names sorted by last name and the first + middle names. Sounds easy, something like this: SELECT DISTINCT (name.Last, name.First||' '||name.Middle) FROM Name name ORDER BY ...

8. SQLResultSetMapping + NativeQuery always create 2nd Query    forum.hibernate.org

Newbie Joined: Mon Jan 12, 2009 6:54 pm Posts: 3 Hi, I'm using JPA 1.0 on top of Hibernate 3.3.1.GA. I'm trying to map a custom query to a POJO. The native Query looks like: Code: SELECT a.nusernr as userId, a.suserid as username, b.ssexid as gender, date_part( 'year', age( b.dbirth)) as age, c.bpicture as bpicture,d.ncountrynr as ncountrynr ,d.stld as stld ,d.siso ...

9. Query begin to be slowly    forum.hibernate.org

org.hibernate.dialect.MySQLInnoDBDialect false true true true ...





10. Many to Many query    forum.hibernate.org

Hi, I have the tables "Student" and "Course" and the join table "student_course". Code: Student student_course course id ...

12. Hierrachy in hibernate query    forum.hibernate.org

Quote: hi, I wanna get a hibernate query so that i can retrieve values from my table in a tree hierarchy. I have the following tables 1) acc_chart id name parent level -------------------------------- 1 schd null 0 2 P1 1 1 3 P2 1 2 4 P3 1 2 5 S1 2 3 6 A1 2 3 7 AS1 6 4 ...

13. Duplicate Query    forum.hibernate.org

Hi all, I have a problem when a query takes more than 80 seconds, it automatically gets duplicated and if the duplicated one reaches the 80 seconds generates another thread more. Probably I have something bad configured but I don't know why. This is my configuration: jdbc:mysql://localhost/copiaPro org.gjt.mm.mysql.Driver ...

14. Need optimized Query for hibernate    forum.hibernate.org

Hi, I have two arrays of values X,Y,Z and 1,2 There is a table A with two columns Name and Place. I want to validate that in table A records with all the combination exists irrespective of duplicates. e.g. Table A -------- X 1 Y 1 Z 1 X 2 Y 2 Z 2 I believe it is not appropriate to ...

15. Parallel query    forum.hibernate.org

Hi all, I think our application is hanging quite often because of hibernate running parallel queries. When it is reading large tables may be hibernate is running parallel queries to get the result set. Also in this process queries are competing with each other and finally running into dead lock state. It may be true or not but is there a ...

16. Specifying BatchSize for particular query    forum.hibernate.org

Hi all, I've already searched API and Hibernate source but I wanted to be 100% sure that this is not possible. We have a scenario where n+1 queries are having a negative impact on performance and I wanted this particular query to have a very aggressive BatchSize. I know I can annotate the class or the collection but if I do ...





17. One-to-Many Query    forum.hibernate.org

Hi, Just been playing around with hibernate and i came across this issue which i dont know how to solve. Any help will be appreciated. I have a 2 Entities. Client Entity has collection of Session Entities. Client.java public class ClientDO implements Serializable{ @Id @Column(name="clientID") @GeneratedValue(strategy=GenerationType.AUTO) private Integer id; private String status; @Column(name="DateOfBirth") @Temporal(javax.persistence.TemporalType.DATE) private Date dob; private String login; private ...

18. problemi inupdate query    forum.hibernate.org

Hi All, I am facing a problem in hibernate update query the case In my table there are 5 fields id - not null - pk name - not null class - not null created_by - not null updated_by - not null when i try to update a record it gives the null pointer exception in created by field. If I ...

19. Classic Query Translator    forum.hibernate.org

Hi, This could be very basic. what does it mean to use org.hibernate.hql.classic.ClassicQueryTranslatorFactory for parsing query. I am looking at an answer along the lines, if it is not encouraged. or if there are caveats pertaining to its use. Also if someone can explain what is new in the New parser ? Thanks, Ritesh

20. Using subtraction in hibernate queries    forums.oracle.com

21. hibernate query wtf    forums.oracle.com