@Entity
public class User {
@Id
@GeneratedValue
private int id;
private String name;
private String email;
private String sex;
private int age;
private Date birthday;
private Date registerdate;
private String login;
private String password;
@ManyToMany
@JoinTable(name = "eventlike_user", joinColumns = @JoinColumn(name = "id_user"), inverseJoinColumns = @JoinColumn(name = "id_eventlike"))
private Collection<Eventlike> eventlikes;
@OneToMany
private Collection<Event> events;
//getters and setters
I get the following error when creating tables:
ERROR: HHH000388: Unsuccessful: create table User (id int8 not null, birthday timestamp, email varchar (255), login varchar (255), name varchar (255), password varchar (255), registerdate timestamp, sex varchar (255), primary key (id)) Nov 12, 2014 10:55:33 AM org.hibernate.tool.hbm2ddl.SchemaUpdate Run ERROR: ERROR: Error syntax at or near "User" Position: 14
I do not know what is causing this table to be created, but what catches my attention is this type int8
of id
.