steve wrote:
This goes to another, unrelated discussion had on the forum a while ago, but another option would be to add the ability to retreive the current date/time from the underlying database either through Session or SessionFactory.
You should be able to do this now. Create a view that returns a single row containing the current date. In Oracle, it could look something like:
CREATE VIEW GET_CURRENT_DATE (CURRENT_DATE) AS
SELECT SYSDATE FROM DUAL;
The only issue that I can think of may be if Hibernate caches the object returned from an initial query and subsequent queries only return the object from the cache and doesn't requery the view in the database. However, the documentation does say that the various Session.find methods will never return stale data, so it sounds like it should work. (Somebody please correct me if I'm wrong).