 |
|
 |
 |
|
 |
 |
| Author |
Message |
|
|
Post subject: Difficulty with JPA RevEng + Postgres + BIGSERIAL
Posted: Oct 04, 2008 - 05:51 PM
|
|
Joined: Sep 05, 2008
Posts: 2
|
|
I'm having difficulty with JPA and BIGSERIAL id's under PostgreSQL.
I'm using Eclipse Version: 6.0.1 GA over PostgreSQL 8.3.1 on MacOS/X 10.5.4.
I'm applying JPA Reverse Engineering to a database containing table definitions like this:
CREATE TABLE address
(
addressId BIGSERIAL NOT NULL,
accountId BIGINT NOT NULL,
street1 VARCHAR(256) NULL,
... other fields...
PRIMARY KEY (addressId),
FOREIGN KEY (accountId) REFERENCES account(accountId)
);
I'm generating abstract classes.
My jpa.reveng.xml contains:
<table name="address" catalog="public">
<primary-key>
<generator class="native" />
<column name="addressId" />
</primary-key>
</table>
However, the id getter in AbstractAddress.java only contains the following annotations:
@Id
@Column(name = "addressid", unique = true, nullable = false, insertable = true, updatable = true)
public Long getAddressid() {
return this.addressid;
}
I think it ought to contain a @GeneratedValue like this:
@Id
@GeneratedValue
@Column(name = "addressId", unique = true, nullable = false, insertable = true, updatable = true)
public Long getAddressId() {
return this.addressId;
}
What am I missing here?
Thanks in advance,
Ken Bowen |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Difficulty with JPA RevEng + Postgres + BIGSERIAL
Posted: Oct 06, 2008 - 05:08 PM
|
|
Registered Member


Joined: Apr 18, 2007
Posts: 5657
|
|
Ken,
This is a known issue that the dev team is already working on. Im sorry you ran into this issue. We shall try to get it fixed asap. |
_________________ Nipun
MyEclipse Support
|
| |
|
|
|
 |
|
|
| |
|
|
 |
|
 |
|
|
|
 |