-->
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: Create sequence even if it is not used
PostPosted: Wed Feb 08, 2006 3:07 am 
Newbie

Joined: Thu Dec 22, 2005 4:09 am
Posts: 8
Is it possible to create sequence even if it is not used in @GeneratedValue? I use this sequence later to fill part of composite id in my DAO. Would be good if I could describe as much as possible of database related with bean.

Hm...Triggers creation also would be good to have. ;-)


For example:

Code:
@Entity
@SequenceGenerator(name = "SEQ_MEASURING", sequenceName = "SEQ_MEASURING")
public class Measuring extends AbstractDatabaseBean {
   ////////////////////////////////////////////////////////////////////////////
   //
   // Constructor
   //
   ////////////////////////////////////////////////////////////////////////////
   public Measuring() {
   }
   ////////////////////////////////////////////////////////////////////////////
   //
   // Id
   //
   ////////////////////////////////////////////////////////////////////////////
   private MeasuringId m_id;
   @EmbeddedId
   public MeasuringId getId() {
      return m_id;
   }
   public void setId(MeasuringId id) {
      m_id = id;
   }
   [cut]
}


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 08, 2006 2:45 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
there are some database-object things in hbm files, you probably can use this syntax

_________________
Emmanuel


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.