|
Hi All,
I need help in hibernate related issue. I need to override the method which used by hibernate api to fetch children records. Scenario: I have declared set in hibernate xml file.
<set name="messages" cascade="delete" inverse="true" lazy="true"> <key column="topic_id"/> <one-to-many class="com.common.data.bulletinboard.MessageData"/> </set>
Parent : Topic
Child set : Messages.
Hibernate version:[3.0]
While fetching messages through lazy loading, I need to convert some date fields to user defined timezone. Which method I have to override in order to perform action which would be reflected in child records.
Thanks in Advance
Regards
Chauhan[/b]
Sorry Friends.
I didn't write my requirment completly. In my application, I am using Sping,JSTL and hibernate. After putting topicData in model at server side , we can access same through JSTL in JSP. like "
<c:set var="topicData" value="${topicData}"/>
Any field like
<c:out value="${topicData.name}"/>
<c:out value="${topicData.messages}"/> returns collection of child set i.e. messages which are fetched by hibernate by lazy loading. I want to perform some check/action while fetching these records i.e. messages. I have to set timezone in all date field in messages with respect to user timezone. Where I can set all date fields in message child object wrt timezone.
Thanks in Advance
Regards
Chauhan
Last edited by chauhan2222 on Tue Oct 10, 2006 1:41 am, edited 2 times in total.
|