openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Issue with GenerationType.IDENTITY?
Date Wed, 20 Sep 2006 22:37:03 GMT
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