Hello,
Personally I'm using the following pattern alot:
DomainObject o = Utils.getOne(session.find(xx));
When I expect to get exactly one from a query, or getOneorNone() if I
expect one or zero results.
I assume many people use something like that too, so I'd suggest
creating findOne() /
On Aug 3, 2005, at 5:02 PM, Joris Verschoor wrote:
I've created a report (http://opensource.atlassian.com/projects/
hibernate/browse/HHH-820) and I'm creating the patch, which will be
there in a couple of minutes if sourceforge works
As already said on JIRA, Query.uniqueResult() exists and
I just added support for optimistic locking based on the database
server's current timestamp, as opposed to the jvm timestamp.
However, was not sure how to retrieve the current timestamp for all
dialects (I got all the major ones expect HSQLDB). So if a certain
Dialect is near and dear to your he
My understanding is that if you want to do stuff like this in HSQLDB,
you must create a special "dual" table manually. However, I think it is
reasonable to fall back to jvm datetime for HSQLDB, since the
overwhelmingly common case is that HSQL is running in-process *anyway*.
-Original Message