Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 24079 invoked from network); 9 Oct 2007 19:25:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2007 19:25:49 -0000 Received: (qmail 19542 invoked by uid 500); 9 Oct 2007 19:25:36 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 19521 invoked by uid 500); 9 Oct 2007 19:25:36 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 19512 invoked by uid 99); 9 Oct 2007 19:25:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 12:25:36 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of blacknext@gmail.com designates 64.233.162.233 as permitted sender) Received: from [64.233.162.233] (HELO nz-out-0506.google.com) (64.233.162.233) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 19:25:37 +0000 Received: by nz-out-0506.google.com with SMTP id f1so3502048nzc for ; Tue, 09 Oct 2007 12:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=3PXtXBSU7AR6lXX+LqV3GZREgTaZHVj2VSsCD6L8Mlw=; b=smSLDO0hiXgr8XKvCIoxVoj3WtSXHL06uKmaYBJLYnyO+d283lqPQ+1k+FAPywt7fnwnEnlIMiYS58JT+M2lT41v6ws4vtmtnHg2vV3tVhpByn10GndsBQz8RIBo1VoiuGbPDhO0g/GpVpdlqsjDn23jADbGuI3FVZIJy6aHrzI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=g2/MiLWEM88FNALAoG7OckSanbBOBQeVINNQjIaqJMZKfDHacqIEKUPFsQTYpwTtQzN0olfiDI2lC7fx+JxV2gLp5KotkDVKFJifEgh04mPrmflcxreixslAUKy7jAo3yYzqJjfiOo8zAwSiqBzK/1Xw5C4KgqfA5Z6UHsdiNlM= Received: by 10.142.245.10 with SMTP id s10mr3523064wfh.1191957915715; Tue, 09 Oct 2007 12:25:15 -0700 (PDT) Received: by 10.142.231.10 with HTTP; Tue, 9 Oct 2007 12:25:15 -0700 (PDT) Message-ID: Date: Tue, 9 Oct 2007 15:25:15 -0400 From: "Michael Gentry" To: user@cayenne.apache.org Subject: Re: PostgreSQL Money type In-Reply-To: <9cc55f600710091203o1191a2b5k2fb3be9b6d235913@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9cc55f600710091203o1191a2b5k2fb3be9b6d235913@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org In the modeler, for the DbEntity, try using the NUMERIC (or maybe even DECIMAL, but try NUMERIC first) type and for the ObjEntity it should sync up as a java.math.BigDecimal. Set the scale to 2 (if you want 2 places after the decimal point). I believe that will work, but I don't have PostgreSQL here to test it quickly. Also, according to the PostgreSQL documentation, the money type is deprecated: http://www.postgresql.org/docs/8.2/interactive/datatype-money.html It is essentially a NUMERIC with a default scale of 2. /dev/mrg On 10/9/07, Chris Gamache wrote: > Fellow Cayenne users, > > How do you handle inserting data into columns of type Money? > > Is there a magic combination of Java type and SQL type? > > Have you created a Money class and a custom data type converter? > > CG >