openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: Issue with GenerationType.IDENTITY?
Date Fri, 13 Oct 2006 16:19:02 GMT
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 <kwsutter@gmail.com> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message