users@glassfish.java.net

Re: GF 2.1b60e breaks backward compatibiliy SEQ_GEN_SEQUENCE bug

From: <glassfish_at_javadesktop.org>
Date: Wed, 11 Feb 2009 11:15:32 PST

Thanks! I was reviewing my code and saw the problem (see below):

with this entity:

@Entity
public class Car {

  @Id
  @GeneratedValue(strategy=GenerationType.SEQUENCE)
   private Integer id;

    ...
}

in GF2ur2 it's used a sequence named 'car_id_seq' for id next value. BUT, in GF2.1 it's used a sequence named 'seq_gen_sequence'.

In other words, GF2ur2 uses, as default, one sequence per entity and in GF2.1 there is one sequence for all entities with strategy SEQUENCE.

If I'm correct, GF2.1 breaks backward compatibility.
[Message sent by forum member 'leandro_komosinski' (leandro_komosinski)]

http://forums.java.net/jive/thread.jspa?messageID=331346