2 ms·
This is interesting - do you know of any examples out there of the structure you're talking about?
by netcraft 13y ago
This is interesting - do you know of any examples out there of the structure you're talking about?
- ebiester 13y agoI've personally used it in a few hairy situations, but I haven't had to in a long time. http://stackoverflow.com/questions/425294/sql-database-views-in-grails http://stackoverflow.com/questions/425294/sql-database-views... is how you would do direct SQL without GORM, which you would use if you wanted to avoid hibernate entirely. The rest is just command objects - http://grails.org/doc/latest/guide/theWebLayer.html#commandObjects http://grails.org/doc/latest/guide/theWebLayer.html#commandO... - and more importantly, @Validatable. http://grails.org/doc/latest/guide/validation.html#validationNonDomainAndCommandObjectClasses http://grails.org/doc/latest/guide/validation.html#validatio... (Technically, command objects are a specific function within the controller, but what we're really looking to do is leverage the validation framework.) It's extra work, but no less so than avoiding an ORM in any framework. But if you can do it in Hibernate, you probably don't need to bother with this most of the time. (When I had to do it, it was to interface with stored procedures.) http://grails.org/doc/latest/guide/hibernate.html http://grails.org/doc/latest/guide/hibernate.html is there if you want to bolt GORM on to legacy classes.