This is how i have used oracle sequence.
sequenceName="CUSTOMER_SEQ": Is the name is the name of your database
sequence.
name="CUSTOMER_SEQUENCE": U will use in Entity as i have used it with id
field.
/////////////////////////////////
@Entity
@Name("Customer")
@Scope(EVENT)
@Table(name="Customer")
@SequenceGenerator(name="CUSTOMER_SEQUENCE",
sequenceName="CUSTOMER_SEQ")
public class ERegCustomer implements Serializable
{
private Integer id;
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE,
generator="CUSTOMER_SEQUENCE")
public Integer getId()
{
return id;
}
public void setId(Integer id)
{
this.id = id;
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044923#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...