Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 45665 invoked from network); 13 Oct 2006 16:19:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Oct 2006 16:19:25 -0000 Received: (qmail 93150 invoked by uid 500); 13 Oct 2006 16:19:25 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 93065 invoked by uid 500); 13 Oct 2006 16:19:25 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 93056 invoked by uid 99); 13 Oct 2006 16:19:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2006 09:19:24 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of kwsutter@gmail.com designates 66.249.92.171 as permitted sender) Received: from [66.249.92.171] (HELO ug-out-1314.google.com) (66.249.92.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Oct 2006 09:19:24 -0700 Received: by ug-out-1314.google.com with SMTP id y2so628219uge for ; Fri, 13 Oct 2006 09:19:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Pcnd+saKmvDLvhp8XOMMeBSBeaKfdimJ9+cfpZQ90upFQnTP3vIIQ796JfvRk6+db0NrBXoPZxmPfm9D8ljak9Fnzy6VOhp95OuHl7luyAKljyuJz5NdxFGcNnbxepzsN127hepjdOk5Hx4zTiA+qWFSeYjmBtIn0rZXpyo87Io= Received: by 10.78.160.2 with SMTP id i2mr3870386hue; Fri, 13 Oct 2006 09:19:02 -0700 (PDT) Received: by 10.78.128.3 with HTTP; Fri, 13 Oct 2006 09:19:02 -0700 (PDT) Message-ID: <89c0c52c0610130919p45ca62b5o91ae595bf5c931d4@mail.gmail.com> Date: Fri, 13 Oct 2006 11:19:02 -0500 From: "Kevin Sutter" To: open-jpa-dev@incubator.apache.org Subject: Re: Issue with GenerationType.IDENTITY? In-Reply-To: <89c0c52c0609201537x1d347a22kd9e4113ae4ce739@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21640_12743844.1160756342339" References: <89c0c52c0609201537x1d347a22kd9e4113ae4ce739@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_21640_12743844.1160756342339 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline FYI, it seems that the changes that Abe did for OPENJPA-13 (via 453016) resolved this problem. The various class types (Long, Integer, etc) are now processed correctly. Thanks, Abe, for the solution. Kevin On 9/20/06, Kevin Sutter wrote: > > Hi, > It seems that if I map an ID to an Identity Column, then, OpenJPA > automatically returns a type BigDecimal? I am not using this type > anywhere. It does not happen with other Integer or Long mappings, just with > generated strategy. > > @Id > @GeneratedValue(strategy=GenerationType.IDENTITY) > @Column(name="ORDER_ID") > public Long getOrderId() { > return orderId; > } > public void setOrderId(Long orderId) { > this.orderId = orderId; > > [9/19/06 17:44:23:750 EDT] 0000002d SystemOut O > <0|true|0.9.0-incubating-SNAPSHOT> > org.apache.openjpa.persistence.PersistenceException: java.math.BigDecimalincompatible with > java.lang.Long > [9/19/06 17:44:23:750 EDT] 0000002d SystemOut O at > org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1576) > [9/19/06 17:44:23:750 EDT] 0000002d SystemOut O at > org.apache.openjpa.kernel.StateManagerImpl.assignObjectId( > StateManagerImpl.java:475) > [9/19/06 17:44:23:750 EDT] 0000002d SystemOut O at > org.apache.openjpa.kernel.StateManagerImpl.assignField( > StateManagerImpl.java:554) > [9/19/06 17:44:23:750 EDT] 0000002d SystemOut O at > org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField( > StateManagerImpl.java:1325) > [9/19/06 17:44:23:750 EDT] 0000002d SystemOut O at > org.apache.openjpa.kernel.StateManagerImpl.accessingField( > StateManagerImpl.java:1308) > > Before I dig further, I thought I would check with the group first. > Thanks. > > Kevin > ------=_Part_21640_12743844.1160756342339--