I need to have my application work both on Oralce and MySQL.
I annotated the id's entity as:
Code:
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQUENCE")
@SequenceGenerator(name = "SEQUENCE", allocationSize = 1, sequenceName = "my_sequence")
when everything goes fine when I use Oracle, but when I want to execute my application on MySQL I got an error that it does not know generator "SEQUENCE".
if I do this:
Code:
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.AUTO)
is there anyway to specify sequence name on Oracle?
Thanks in forward