Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 11170 invoked from network); 20 Jul 2005 16:57:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jul 2005 16:57:34 -0000 Received: (qmail 22719 invoked by uid 500); 20 Jul 2005 16:57:33 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 22706 invoked by uid 99); 20 Jul 2005 16:57:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2005 09:57:33 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [81.174.133.99] (HELO roobarb.ajsoft.net) (81.174.133.99) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2005 09:57:29 -0700 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by roobarb.ajsoft.net (Postfix) with ESMTP id CA8C41112B for ; Wed, 20 Jul 2005 17:57:27 +0100 (BST) From: Andy Jefferson To: jdo-dev@db.apache.org Subject: Re: Binding a char to PreparedStatement Date: Wed, 20 Jul 2005 17:57:27 +0100 User-Agent: KMail/1.7.2 References: <42DBD7F6.50807@spree.de> <200507201740.04821.andy@jpox.org> <68750305-F8B0-466F-BDA5-1611A3C130C9@Sun.COM> In-Reply-To: <68750305-F8B0-466F-BDA5-1611A3C130C9@Sun.COM> Organization: JPOX MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507201757.27450.andy@jpox.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > > Well in the case of a char it is, but in the case of a java double for > > example ? It all depends on the RDBMS. Some RDBMS support DOUBLE, some > > DECIMAL, some NUMERIC, some have other types ... > > This is the jdbc-type ("generic sql type"), not the sql-type we're > talking about (there is a separate sql-type that the user can specify > if they want to get database specific). > > The idea is that the user could override the jdbc-type if necessary, > and the jdo impl would use jdbc-type plus length plus nullability to > map to a natural sql-type that is database specific. I'm also talking about the jdbc-type (or to be specific javax.sql.Types). So the JDO impl should always take JDBC Types.DOUBLE when the user has a Java double field? Many JDBC drivers *don't* provide a type mapping for Types.DOUBLE (many don't provide support for several of the "standard" JDBC types). We've always encouraged our users to specify the jdbc-type if they want things to be JDO-impl independent for this very reason. While a default may make sense so people know what they get if nothing is specified, there are *a lot* of situations where the JDBC driver doesnt support a "generic" sql type even -- Andy Java Persistent Objects - JPOX