[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6179) Schema validator - (PostgreSQL) serial type not recognized as integer
Jeroen van Schagen (JIRA)
noreply at atlassian.com
Mon May 2 12:58:59 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42179#action_42179 ]
Jeroen van Schagen commented on HHH-6179:
-----------------------------------------
Excuses, the validator works fine when a "bigserial" type is used. This issue can be removed.
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list