I am running Hibernate as my JPA implementation.
I execute the code below. It generates good SQL, and the resulting list has the right number of objects, but the same object (matching the first row returned by the SQL) is repeated each time. Am I doing something wrong?
Hibernate version: 3.2.4.sp1 (JPA)
[b]Code between sessionFactory.openSession() and session.close():
Code:
private Long topNodeId = 723;
customDataApplications = em.createQuery("SELECT cda FROM CustomDataApplication cda where cda.topNodeId = :nodeId").
setParameter("nodeId", topNodeId).getResultList();
Name and version of the database you are using: Oracle 10g
[b]The generated SQL (show_sql=true):Code:
select
customdata0_.top_node_id as top1_54_,
customdata0_.custom_data_key as custom3_54_,
customdata0_.node_type_code as node2_54_
from
custom_data_application customdata0_
where
customdata0_.top_node_id=?
Thanks,
ken clark