[ https://issues.apache.org/jira/browse/IBATIS-594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704965#action_12704965 ]
Mark Miller commented on IBATIS-594: ------------------------------------ In our use case, we have business objects that can track their own persistence state. When an attribute is changed, the persistence state is set to 'dirty', and once saved the persistence state is set to 'persisted'. The problem occurs when we instantiate an object, it should either be 'persisted' or 'new', 'persisted' when being read from the database and 'new' when created. We set all our objects initially to 'new', the callback helps us to make sure that objects instantiated via iBatis can set their persistence state to 'persisted'. Originally we did this using the row handler, but this doesn't take into account objects instantiated through iBatis lazy loading. The Object[] results argument is not necessary for our case, however I thought that if it was included (doesn't cost anything) it might make the call back useful in other situations. Mark > Object post processor feature request. > -------------------------------------- > > Key: IBATIS-594 > URL: https://issues.apache.org/jira/browse/IBATIS-594 > Project: iBatis for Java > Issue Type: Improvement > Components: DAO > Affects Versions: 2.3.4 > Environment: All platforms. > Reporter: Mark Miller > Priority: Minor > Attachments: postprocessor.patch > > > add object post processing capabilities to iBatis after objects have been > populated from the recordset. > We have found the need to set fields within business objects after they have > been read from a database using iBatis. Up until now we have been using the > row handler callback, however, when using iBatis lazy loading, this does no > longer suffice. > To counter this we have added an interface to the iBatis package to allow for > any implementors to be called after the object has been created and populated. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.