We using MYSQL and Hibernate for our project.
JPA is used to persist object in DB.
We have Multiple class with similar code
@Entity
@Table(name = "users")
class Users implement Serializable {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private Long id;
.
.
.
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
Now we want to give support for oracle too. How should we do it ? strategy=GenerationType.AUTO is not supported by oracle.
One soln is we can define sequence in each POJO which we do not want to do?
please provide us some input so that we can move ahead.