-->
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.  [ 1 post ] 
Author Message
 Post subject: PersistentClass from Configurable or IdentifierGenerator
PostPosted: Fri Jan 05, 2007 4:51 pm 
Newbie

Joined: Thu Feb 10, 2005 12:25 pm
Posts: 2
Hibernate version: 3.0.5

Mapping documents:
Code:
      <id
         name="internalId"
         type="long"
         column="THE_ID"
      >
         <generator class="com.mycompany.RandomLongGenerator">
            <param name="idLength">5</param>
         </generator>
      </id>


I have implemented Configurable and IdentifierGenerator and need to know the length of the id, but as you see in the snippet above, I had to add that as a "param". What I would like is to define the length attribute directly in the id element, and then access that length through Hibernate's API. For example,

Code:
      <id
         name="internalId"
         type="long"
         column="THE_ID"
         length="5"
      >
         <generator class="com.mycompany.RandomLongGenerator" />
      </id>


However, the methods I implement only pass me Type, Properties, Dialect and SessionImplementor, and I can't find any way to get to the PersistentClass or Table, or Column, etc. by using those arguments.

Thanks for any help...


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

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.