You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by mpf <mr...@gmail.com> on 2010/09/27 10:47:09 UTC

implicit sequence

Hi there!
Is it possible to map an implicit sequence with jpa?

for example:
	@Id
	@SequenceGenerator(name = "SEQ_GEN_T_STAAT", sequenceName = "SEQ_T_STAAT")
	@GeneratedValue(generator = "SEQ_GEN_T_STAAT", strategy =
GenerationType.SEQUENCE)
	@Transient
	private Integer id;

this is a definition for an explicit sequence and it works but for know I
must switch to implicit sequences - is there any possibility so map an
implicit sequence?

database: db2
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/implicit-sequence-tp5574006p5574006.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: implicit sequence

Posted by mpf <mr...@gmail.com>.
argh..
shame on me, just need

@GeneratedValue(strategy = GenerationType.IDENTITY)
-- 
View this message in context: http://openjpa.208410.n2.nabble.com/implicit-sequence-tp5574006p5574070.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.