> An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I do love how you give me tribute like that, but it breaks my <img> tags :-(
I recently started working with Grails and it's like a breath of fresh air. (and when it isn't, it's not Grails' fault, it's the frameworks it's built on that are actually getting in the way)
@jadarnel27 Yeah, that's the same idea as that other one we were talking about the other day, except this one just has it's "inner table" still in there rather than generating it and stashing it in a table variable.
That's typically how I usually write my queries that need to aggregate data and then do some other calculations / joins with the aggregate.
@cdeszaq Yeah, I'm thinking I might just do some HQL and throw it in my service class, since the query really isn't going to return anything resembling any of my domain objects.
@mootinator umm... then what is it going to return?
@mootinator And yes, if it doesn't return a single instance or a list of one of your domain objects, it should probably be a service. (ie. if it's just a generic list of strings or numbers or whatever, then a service method is ideal)
@cdeszaq Something like SELECT table1.Date, table2.resource, table1.job, SUM(table2.qty), table2.unit of measure WHERE table2.resource IN (SELECT resource FROM table3) GROUP BY Date, resource, job, uni of measure
@mootinator The way they handle that issue now is that, for default "simple" mappings, only the domain classes' statically typed fields are bound/mapped and they changed the ordering of dependency injections.
Spring MVC actually gives much more control over the mapping issue, and i put in a grails feature request to make the Grails mapping better, but I don't think it will go anywhere.
I agree though that there isn't really any good solution because even the asp.net mvc method has issues, since you have more objects(code) to deal with.