Why is an oracle sequence named hibernate_sequence being created with JPA using Hibernate with the O

Posted by JavaRocky on Stack Overflow See other posts from Stack Overflow or by JavaRocky
Published on 2010-06-17T01:04:41Z Indexed on 2010/06/17 1:12 UTC
Read the original article Hit count: 394

Filed under:
|
|
|
|

All my entities use this type of @Id

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "MYENTITY_SEQ")
@SequenceGenerator(name = "MYENTITY_SEQ", sequenceName = "MYENTITY_SEQ")
@Column(name = "MYENTITY", nullable = false)
private Long id;

Or

@Id
@Column(name = "MYENTITY")

I find that an oracle sequence named hibernate_sequence is always created. Why is this so? And how can i avoid this?

I am using JPA1 with Hibernate 3 and the Oracle 10g dialect.

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate