Thanks Max,
Quote:
a. for scalars it requires declaring them;
no true anymore. we auto detect it now.
Then update documentation please:
http://www.hibernate.org/hib_docs/v3/re ... medqueriesQuote:
A named SQL query may return a scalar value. You must declare the column alias and Hibernate type using the <return-scalar> element:
How about my last addition: using setters to populate arbitrary classes (do NOT require constructor) from HQL or SQL result sets?
Anyway I do not think that Hibernate should incorporate all kind features iBatis has exactly because reasons you have hinted: complexities for caching, relationships tracing etc. etc. etc. Hibernate in my opinion is getting more and more bloated with unnecessary features like XML sessions and auto generation of DB schema. Hibernate is loosing targeted approach that caused it to become so successful.
In my opinion there are situations where Hibernate is clear winner and situations where iBatis is more appropriate. That is why I suggest in certain cases to use both.
Just let it be this way, enough is enough, scope creep is very dangerous thing. Bash does not try to include awk and sed but allow using them easily. This principle makes Unix systems shine and it used to serve Hibernate well, because of the targeted approach Hibernate won against JDO and EJB....
OK, enough ranting, I wish you good luck and be stuck to common sense