List 13 « Map « JPA Q&A





1. DB2 cursor closed error while listing result set    forum.hibernate.org

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [select this_.MBR_ID as MBR1_25_0_, this_.CUST_ID as CUST2_25_0_, this_.CLNT_ID as CLNT3_25_0_, this_.PRESBR_ID as PRESBR4_25_0_, this_.PRES_ELIG_EFFV_DTE as PRES5_25_0_, this_.PRES_ELIG_TERM_DTE as PRES6_25_0_ from ARGRX2.PRESBR_ELIGY_LCK this_ where this_.CUST_ID=? and this_.CLNT_ID=? and this_.MBR_ID=? and this_.PRES_ELIG_TERM_DTE>?]; SQL state [null]; error code [-99999]; [ibm][db2][jcc][10120][10898] Invalid operation: result set is closed.; nested exception is com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10120][10898] Invalid operation: ...

2. Leal memory in query.list()    forum.hibernate.org

Hello everybody, I am developing a application using hibernate 3.1, and my OldGen memory in the JVM is inscreasing till the system gets collapsed. I have found that the problem is relared to Lists in Hibernate ( query.list(); ). Any of you know how can I find out a solution to the problem ? This is my code : --------------------------------------------------------------------------------- session ...

3. Leal memory in query.list()    forum.hibernate.org

Hello everybody, I am developing a application using hibernate 3.1, and my OldGen memory in the JVM is inscreasing till the system gets collapsed. I have found that the problem is relared to Lists in Hibernate ( query.list(); ). Any of you know how can I find out a solution to the problem ? This is my code : --------------------------------------------------------------------------------- session ...

4. Leal memory in query.list()    forum.hibernate.org

Hello everybody, I am developing a application using hibernate 3.1, and my OldGen memory in the JVM is inscreasing till the system gets collapsed. I have found that the problem is relared to Lists in Hibernate ( query.list(); ). Any of you know how can I find out a solution to the problem ? This is my code : --------------------------------------------------------------------------------- session ...

5. Leal memory in query.list()    forum.hibernate.org

Hello everybody, I am developing a application using hibernate 3.1, and my OldGen memory in the JVM is inscreasing till the system gets collapsed. I have found that the problem is relared to Lists in Hibernate ( query.list(); ). Any of you know how can I find out a solution to the problem ? This is my code : --------------------------------------------------------------------------------- session ...

6. Searching sub-lists of entities    forum.hibernate.org

Wouldn't that be something like from EntitiyA as a left join a.children as b where b = :referenceEntityB I haven't tested it, but i believe this one will create an outer join which again will return the elements that has B in it. If you want the EntityA to come back with its children collection initialised, add "fetch" after "left join": ...

8. Persisting a @CollectionOfElements (List)    forum.hibernate.org

Hello, I'm trying to map a class which has a List property. This list is persisted in a database table, which only has two columns, the foreign key to the mapped class, and the integer value. My code is this: @CollectionOfElements @JoinTable( name="resourceGroupHasResources", joinColumns = { @JoinColumn(name="idResourceGroup") } ) @Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.DELETE_ORPHAN}) @Column(name="idResource") public List getResources(){...} It works fine, but when I ...

9. how does HQLQueryPlan handles list    forum.hibernate.org





11. Mapping/delete problem from indexed collection (list)    forum.hibernate.org

public class Row { public static class Key implements Serializable { private Integer year; private Integer number; private Integer rownum; // getters/setters omitted } private Key key; private Document parent; private Integer idx; ...

12. Avoid updating for list of primitives    forum.hibernate.org

13. SQLQuery list problem    forum.hibernate.org

I have a SQLQuery like this: select count(*) , avg(customer.salary) from customer where customer.salary > 1000.0 and customer.salary < 10000; and I'm using hibernate session.createSQLQuery and list function. it returns List. first element of Object array has Integer type (because of count(*)) and second element has Double type (because of avg). but the problem is that both elements has the equal ...

14. Storing a list of abstract objects    forum.hibernate.org

@Entity @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name="thingsType") public [b]abstract [/b]class Thing implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.SEQUENCE) @Column(name="oid", nullable=false, insertable=true, updatable=true, length=8) private Long oid; ... } @Entity @DiscriminatorValue(name="cat") public class Cat extends Thing{ .... } @Entity @DiscriminatorValue(name="human") public class Human extends Thing{ .... } @Entity public class Box implements Serializable { ...

15. First child object in the list is null    forum.hibernate.org

16. nested list mappings    forum.hibernate.org

Hi, i have the following classes: MyClass, YourClass and HisClass MyClass contains a List of YourClass and YourClass contains a List of HisClass so I have a class that contains a List of Objects, each of which contains a List of more Objects... so I map: ... ... ...





17. nested list mappings    forum.hibernate.org

Hi, i have the following classes: MyClass, YourClass and HisClass MyClass contains a List of YourClass and YourClass contains a List of HisClass so I have a class that contains a List of Objects, each of which contains a List of more Objects... so I map: Code: ... ...

18. nested list mapping    forum.hibernate.org

Hi, i have the following classes: MyClass, YourClass and HisClass MyClass contains a List of YourClass and YourClass contains a List of HisClass so I have a class (MyClass) that contains a List of Objects (YourClass), each of which contains a List of more Objects (HisClass)... so I map: Code: ...

19. How to re-index a List-association with list-index    forum.hibernate.org

I have following relation Parent having two Children Child1 and Child2. Following is the sample mapping. Code:

20. Getting the list of object without using relations    forum.hibernate.org

Newbie Joined: Wed Sep 16, 2009 1:24 am Posts: 9 I have two tables 1. LoanCustomerDetail - having relation with LoanDetail table 2. CustomerObject - temporary table I need to get list of LoanCustomerDetail objects ,based on the customerNo's from the CustomerObject,which has no relation with LoanCustomerDetail object. For this I need to write a HQL to list all loanCustomerDetail object, ...

21. JPQL to list the last N records from a table    forums.oracle.com

22. List use in JPQL syntaxis    forums.oracle.com

Hello. Can I use List in JPQL syntaxsis? I can, please write. Thanks public int getCardsByIdsSorted(//List cardIds, String field, boolean ascending) { int a = 0; List cardList; //= new ArrayList(); List cardIds = new ArrayList(); cardIds.add("66b72972-ea0e-4b24-a692-f220da739298"); cardIds.add("35676406-0fd4-4fd2-9ca7-22c628978983"); cardIds.add("520602e3-bd47-486c-8824-b2ac7d4957ab"); try { cardList = entityManager.createQuery("SELECT u FROM Card u WHERE u.id IN (:cardIds)").setParameter("cardIds", cardIds).getResultList(); a = cardList.size(); } catch (Exception ex) { ...