[ http://issues.apache.org/jira/browse/IBATIS-226?page=comments#action_12358103 ]
Clinton Begin commented on IBATIS-226: -------------------------------------- Random thoughts... >>Sometimes I need total control over the caching mechanism for very critical >>systems. >>I need to also guarantee object identity and I can only do this when handling >>the result set myself. Fair enough, but if you just turn iBATIS cache models off, then you can easily build a caching mechanism above the iBATIS API that will guarantee object identity etc. You can also use a RowHandler that will give you basically what you're looking for, but without having to deal with the result set. I don't believe that you MUST have acces to the result set to achieve object identity (unless you're tightly binding your object model to your data model, in which case I suppose you should use an ORM). That said, I don't have a problem with making this an alternative approach to handling result sets, to override the normal handling. In fact, I prefer it to other proposed alternatives of returning ResultSets or RowSets.... There is a lot of potential to mess things up by overriding such a thing in iBATIS....but I suppose we don't need to support it beyond the interface. As for the dependency on DBUtils...yeah, that's definitely out of the question (especially for 3 lines of code). However, it is a simple interface that we could easily include in iBATIS. Cheers, Clinton > Support Commons DBUtils ResultSetHandler > ---------------------------------------- > > Key: IBATIS-226 > URL: http://issues.apache.org/jira/browse/IBATIS-226 > Project: iBatis for Java > Type: New Feature > Components: SQL Maps > Reporter: Paul Benedict > > Sometimes I need total control over the caching mechanism for very critical > systems. I need to also guarantee object identity and I can only do this when > handling the result set myself. I propose adding an attribute to the > <statement> tag (and also <select>, <insert>, <update>) that will specify a > subclass of ResultSetHandler so that I may write custom code and decode the > ResultSet myself. The ResultSetHandler class is part of the Jakarta Commons > DBUtils package. It is extremely useful! > <select id="findMyObject" resultSetHandler="com.company.MyResultSetHandler"> > To prevent excess object creation, IBATIS must reuse the same instance it > creates. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira