Is there a reason saveOrUpdate(Obj) doesn't return the new Id of the object submitted? I'm often at a point where I don't know if the Entity I'm persisting is new or not, but I do need to know it's Id value after I've submitted it. I'm putting near identical versions of the following code in a lot of places:
Code:
if (Entity.isNew()) return session.save(Entity);
session.update(Entity);
return Entity.get(Id);
Is there anything wrong with this line of thinking? If there's not how do I pass a request to change it on to the development team?
-James