I've created user and userRole tables
user entity
@Entity
@Table(name = "USERS")
public class User {
@Id
@Column(name = "USERNAME", nullable = false, unique = true)
private String username;
@Column(name = "PASSWORD", nullable = false)
private String password;
@Column(name = "ENABLED", nullable = false)
private boolean enabled = true;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "user", fetch = FetchType.EAGER)
private Set<UserRole> userRole = new HashSet<>();
userRole entity
@Entity
@Table(name = "USER_ROLES", uniqueConstraints = @UniqueConstraint(
columnNames = { "ROLE", "USERNAME" }))
public class UserRole {
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "user_role_id",
unique = true, nullable = false)
private Integer userRoleId;
@Column(name = "ROLE")
private String role;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "USERNAME")
private User user;
When i launch my app i get an Error and this stack trace:
ERROR JdbcEnvironmentImpl:420 - Could not fetch the SequenceInformation from the database
org.h2.jdbc.JdbcSQLException: Column "start_with" not found [42122-197]
But i don't have any 'start_with' columns. Before my UserRole entity was without userRoleId column and everything worked fine but then i added it to do 'role' column not unique and then this happened. But still everything works fine, i just disturbed by this error, what can be the couse of it?