Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
kbowen42
Post subject: Difficulty with JPA RevEng + Postgres + BIGSERIAL  PostPosted: 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
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: Difficulty with JPA RevEng + Postgres + BIGSERIAL  PostPosted: Oct 06, 2008 - 05:08 PM
Registered Member
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
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits