Schema validator - (PostgreSQL) serial type not recognized as integer
---------------------------------------------------------------------
Key: HHH-6179
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6179
Project: Hibernate Core
Issue Type: Bug
Reporter: Jeroen van Schagen
PostgreSQL serial types are not recognized as integers, causing the schema validator to
fail in the following situation:
CREATE TABLE posts (id serial PRIMARY KEY, message varchar(255), date timestamp) ;
@Entity
@Table(name = "posts")
public class Post {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String message;
private Date date;
}
---
org.hibernate.HibernateException: Wrong column type in public.posts for column id. Found:
serial, expected: int8
---
The validator should not fail, because serial types are actually auto-incrementing integer
types.
Source:
http://www.postgresql.org/docs/8.1/static/datatype.html#DATATYPE-SERIAL
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira