I've run into the same problem with refreshing an un-initialized proxy, and I also think it's a bug. It's even been reported, and not yet rejected (but not assigned, either):
http://opensource.atlassian.com/project ... e/HHH-1645 .
I didn't find that ticket the first few times I searched for it, but there it is!
This approach should work:
Session.lock(object, LockMode.UPGRADE);
Session.refresh(object);
If you'd rather use just one query -- which most people would -- I don't know of a way to do it without HQL/SQL/Criteria. But then you end up writing something specific to each type of object, as you've probably noticed.
If you're using Java 1.5 or later, and all of your entity classes implement an interface that has a getId() method for a corresponding "id" property (or whatever names you prefer), then you could generalize the Criteria solution. It would be nicer if the API worked as expected, though. :)