[ http://issues.apache.org/jira/browse/IBATISNET-154?page=comments#action_12376352 ]
Mario Alberto Chavez commented on IBATISNET-154: ------------------------------------------------ Gilles; Sorry to respond this late, but as Ron said, some times it's required to get more than a key from the database when a record is inserted, My first approach was to use a Stored procedure as you said, but it adds a bit of complexity, because I can not use any more the auto generated insert sql from ibatis and I have to code a SP, or I have to use to sql commands, the first one to get the key, the second one to get the additional data. I feel that i will be more clean of selectKey can support a complex result map. Thanks Mario > Support for SelectKey to use a complex resultMap > ------------------------------------------------ > > Key: IBATISNET-154 > URL: http://issues.apache.org/jira/browse/IBATISNET-154 > Project: iBatis for .NET > Type: Improvement > Components: DataMapper > Versions: DataMapper 1.3 > Environment: Windows XP64, VSNET 2005 > Reporter: Mario Alberto Chavez > Assignee: Gilles Bayon > Priority: Minor > > The insert tag support the use of SelectKey to return the key generated at > server side for that specific record, but it's limited to only return a > scalar value, there are time that when a record is inserted more that the key > is calculated at server side, and those fields have to come back to the > object, the only work around right now is to insert the record and after that > have a select by id action in order to get new generated fields. > I will be useful if selectkey can support a complex - not scalar - resultmap > to address this case in one declaration. > Thanks -- 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