This is the error. The 'SQ_USERS' is the sequence created in a sql server database.
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'dbo.SQ_USERS'.
This is the entity that is used to get the sequence...
@Entity
@Table(name="USERS")
public class User {
@Id
@Column(name="id")
@SequenceGenerator(name = "USER", schema="dbo", sequenceName = "SQ_USERS", allocationSize = 20)
@GeneratedValue(generator = "USER", strategy = GenerationType.SEQUENCE)
private int id;
}
The sql that is generated is "select next_val as id_val from dbo.SQ_USERS with (updlock, rowlock)", but if i try this in sql server management studio, i get the error "Invalid object name 'dbo.SQ_USERS'."
Can anyone help?
Thanks.