Reputation: 7440
I have a JPA Entity like this:
@Entity
@Table(name = "USER", schema="APP")
public class User implements Serializable {
@Id @GeneratedValue
private long id;
private String name;
private static final long serialVersionUID = 1L;
public User() {
super();
}
public String getName() {
return this.name;
}
public void setName(String nam) {
this.name = nam;
}
}
I try to generate the related table in this way:
I think this can be relevant:
I can't see why it creates a schema USER and a table SEQUENCE within it:
Upvotes: 0
Views: 1695
Reputation: 43651
Depending on the database, USER may be a reserved word. You seem to use Derby. It is a reserved word in Derby:
https://db.apache.org/derby/docs/10.2/ref/rrefkeywords29722.html.
Try naming your table differently.
Upvotes: 1