-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Spotting DB changes
PostPosted: Sat Feb 21, 2009 2:01 pm 
Newbie

Joined: Sat Feb 21, 2009 1:52 pm
Posts: 1
I confess to being a bit of a newbie but need help on something that I can't get my head around.

I am developing an ajax web application (but perhaps that's not so relevant) and once a collection of objects has been loaded from the DB I display the records in a table. How can I force the table to be reloaded each time the page gets refreshed. When I *try* to build the list again I just get the same records back.

I have for example a customer record with associated records. I do something like myList = customer.getRecords() but I guess that customer is in the cache and the records have been loaded and are also in the cache. I need to clean the cache but have failed so far.

Any pointers will be very helpful,

Thanks...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2009 7:58 am 
Expert
Expert

Joined: Thu Jan 08, 2009 6:16 am
Posts: 661
Location: Germany
The easiest but not most effective way would be to reload your customer everytime the page is refreshed.

Also you could retrieve records not via customer.getRecords(), but implement some other data access method, which executes an HQL-Query to select all records of a customer, so that you could call "someDAO.loadCustomerRecords(customer)"

_________________
-----------------
Need advanced help? http://www.viada.eu


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.