users@glassfish.java.net

Re: Oracle ROWID and entity id

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Tue, 30 Oct 2007 12:11:52 -0400

Mine looks like this:

@Id
@SequenceGenerator(name="HISTORY_SEQ", sequenceName="web_history_id_seq")
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="HISTORY_SEQ")
@Column(name = "id", nullable = false)
private Integer id;

I'm using PostgrSQL


Ryan


Kenneth Clark wrote:
>
> Hi guys, sorry to hassle you all again
>
>
>
> How do I tell my entity that it’s id will be coming from the database?
>
>
>
> I tried @GeneratedValue(strategy = GenerationType.AUTO) to no avail.
>
>
>
> Do I have to write one for oracle? Does anyone have any documentation
> on how to do this?
>
>
>
> Thanks
>
>
>
>
>
> ________________
>
> Thanks and regards
>
>
>
> *Kenneth Clark*
>
> Solutions Engineer
>
>
>
> ShadowLogo.png
>
> *Tel:** *27 11 679 3075
>
> *Mobile:** *27 (0) 84 583 1348**
>
> *Email:** *_kenneth.clark_at_skyetech.co.za
> <mailto:kenneth.clark_at_skyetech.co.za>_
>
> *Website:** *http://www.skyetech.co.za**
>
>
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.15.12/1098 - Release Date:
> 2007/10/29 09:28
>