Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 32446 invoked from network); 27 Feb 2006 07:44:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Feb 2006 07:44:26 -0000 Received: (qmail 61298 invoked by uid 500); 27 Feb 2006 07:44:21 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 61276 invoked by uid 500); 27 Feb 2006 07:44:20 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 61265 invoked by uid 99); 27 Feb 2006 07:44:20 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Feb 2006 23:44:18 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 0BB2DDD for ; Mon, 27 Feb 2006 08:43:57 +0100 (CET) Message-ID: <1182602233.1141026237045.JavaMail.jira@ajax.apache.org> Date: Mon, 27 Feb 2006 08:43:57 +0100 (CET) From: "Sven Boden (JIRA)" To: dev@ibatis.apache.org Subject: [jira] Commented: (IBATIS-224) isNotNull node causes typehandler mappings in statement to fail MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/IBATIS-224?page=comments#action_12367909 ] Sven Boden commented on IBATIS-224: ----------------------------------- Been thinking a bit on IBATIS-224/210. What about doing a static evaluation/reflection in UnknownTypeHandler whether getEnclosingClass() is available on Class, and if it is available use it as in the patch. This would make iBATIS work with enums in JDK 5 in all cases. I know we don't support 1.5 or enums/generics yet, but it's going to come anyway in the future, and the above doesn't break the current version. Any thoughts/comments? > isNotNull node causes typehandler mappings in statement to fail > --------------------------------------------------------------- > > Key: IBATIS-224 > URL: http://issues.apache.org/jira/browse/IBATIS-224 > Project: iBatis for Java > Type: Bug > Components: SQL Maps > Versions: 2.1.6 > Environment: linux/java 1.5 > Reporter: Reuben Firmin > Priority: Critical > Attachments: ibatis-224_sven.zip, ibatis224.tar.gz > > Here's my insert statement. > > INSERT INTO Deployment ( > environmentId, deploymentTypeId, deploymentStatusId, deploymentTime > ,threadCountOverride > ) VALUES ( > #environmentId#, #deploymentTypeId#, #deploymentStatusId#, #deploymentTime# > ,#threadCountOverride# > ) > > SELECT @@IDENTITY as value > > > deploymentTypeId and deploymentStatusId are enums in the bean, mapped to values using custom type handlers. Without the isNotNull structure around threadCountOverride (which *is* nullable), the statement works. With the isNotNull, deploymentStatusId and deploymentTypeId are mapped to UnknownTypeHandler, and the insert fails to map the parameters from the bean. -- 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