views:

91

answers:

1

I noticed that the Grails hibernate plugin does not support the hibernate load function? Does anybody know why that is? In all of the documentation that I have seen, it seems that the accepted way to delete an object from a db is to do a get() with the object id followed by a delete(). While this works it makes an unnecessary database hit. Was this a concious design decision?

+1  A: 

I tried this in 1.0 and it wouldn't work because of a MetaClass issue, but it appears to work now. There's an open JIRA - http://jira.codehaus.org/browse/GRAILS-5406 - that I'll be implementing for 1.3.

Burt Beckwith
Thanks alot for the response. I personally think get(id, [lazy: true]) is a great interface for this feature. This sounds like a fun task for me to learn how to write a grails plugin.
ssteidl