Mysql Views + Hibernate with Spring HibernateTemplate classes
Hi all,
I am experiencing strange problem for a month or so. I tried all posibilities as well as google but no luck so far.
xyz.hbm.xml defintion
<hibernate-mapping>
<class name="com.churchgroup.model.group.VWGroup" table="vw_groups" catalog="ahumc">
<id name="groupId" type="java.lang.Long">
<column name="groupId" />
</id>
<bag name="groupMemberDetails" cascade="all" lazy="false" table="vw_groupmemberdetails" outer-join="auto" where=" roleName ='Leader'">
<key>
<column name="groupId" />
</key>
<one-to-many class="com.churchgroup.model.group.VWGroupMemberDeails" node="" />
</bag>
</class>
</hibernate-mapping>
In above defintion, I have two views. When I iterate the main view VWGroup class, i will have many records (ex: 5 records ) of VWGroupMemberDeails for each VWGroup.
Here is the problem: All VWGroupMemberDeails list contains expected records (as per above ex: 5 records going to be in list). All 5 records are suppose to be different but One record repeated in list five times. When I query database, I could 5 different records. But In list i have same record repeated 5 times.
dear friends, can you help on this regards? I am totally clueless and have several open critical defects in production.
I really appreciate your help. Thank you so much

