-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Postgres and Hibernate
PostPosted: Tue Mar 03, 2009 6:45 am 
Newbie

Joined: Tue Mar 03, 2009 6:37 am
Posts: 2
Hello!

I am having a problem with the latest Hibernate Version and PostgresQL.

Just a simple thing: Trying to generate with reveng a User Table with
a userid field in it. Everything works fine but the Hibernate Tools, which
I use for generating, do not generate Annotations for the
postgres sequence:

Code:
@Entity
@Table(name = "user", schema = "public", uniqueConstraints = @UniqueConstraint(columnNames = "useridhash"))
public class User implements java.io.Serializable {

   private int userid;
   private Integer clicks;
   private String email;
   private String password;
   private String useridhash;
   private String username;

   public User() {
   }


   @Id
   @Column(name = "userid", unique = true, nullable = false)
   public int getUserid() {
      return this.userid;
   }

   public void setUserid(int userid) {
      this.userid = userid;
   }



As you can see there is nothing like

Code:
@GeneratedValue(strategy=GenerationType.SEQUENCE)



So how do I get the hibernate tools running corectly with postgres serials?

Thanks for our help!
daniel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 04, 2009 7:08 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Wrong forum mate. You should ask the question on the Tools forum - http://forum.hibernate.org/viewforum.php?f=6


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.