|
We're in the early stages of the project and would like to use Hibernate. Have a design question that I could use some guidance on, as I'm very new to Hibernate.
Our object model will have a definition of a LOOKUP_DOM and LOOKUP_DETAIL_DOM with one-to-many relationship (many details exist for each lookup). So the application will hold references to the LOOKUP_DOM object which will contain a Set of LOOKUP_DETAIL_DOM objects.
The DB table containing DETAILS will be updated throughout the day via an MQ interface periodically throughout the day.
Meanwhile, the LOOKUP_DOM will be used repeatedly in the application, so we'd like to take advantage of some caching of values (as much as possible) to avoid making a trip to the DB every time the LOOKUP_DOM is referenced, but I have to make sure the data referenced in the structure is not stale...
Assuming I map the relationship properly, can Hibernate help me with the Caching of the values, AND will it be able to 'recognize' the changes to the underlined DB values and refresh the data in the mapped objects? That's what I'm having trouble understanding... how much work can Hibernate do for me in this case, and how much work I have to do to make sure my DB and DOM objects are in synch such that the applicaiton isn't using stale data.
Please help clarify.
Thanks,
James
|