I'm trying to port my hibernation based application from MySQL to Postgres, but there seems to be a problem with the date format
In my essence, I have
@Entity
@Table( name = "APP_USERS" )
public class User {
@Id
@GeneratedValue(generator="increment")
@GenericGenerator(name="increment", strategy = "increment")
private int id;
private String username;
private String email;
private String password;
private String firstname;
private String lastname;
private Timestamp joindate;
...
but I get an error when creating the table
ERROR: type "datetime" does not exist
sql from "showql"
Hibernate: create table APP_USERS (id integer not null, email varchar(255), firstname varchar(255), joindate datetime, lastname varchar(255), password varchar(255), username varchar(255), primary key (id))
I have installed postgresql-9.5.3-1 locally, and I'm using Hibernate version 5.0.10. Final
Searching for this error on Google gives me very few results.
source
share