-->
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.  [ 3 posts ] 
Author Message
 Post subject: Needed props for configuring a MultipleHiLoPerTableGenerator
PostPosted: Thu Oct 07, 2010 4:35 am 
Newbie

Joined: Tue Aug 07, 2007 3:19 am
Posts: 5
After I upgraded my hibernate from 3.3.2 to 3.5.1 the implementation of MultipleHiLoPerTableGenerator configure method had changed.

When I try to configure an MultipleHiLoPerTableGenerator I get a NullPointerException at line 229 in its configure method:
Code:
227      ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );
228
229      tableName = normalizer.normalizeIdentifierQuoting( PropertiesHelper.getString( ID_TABLE, params, DEFAULT_TABLE ) );


It seems to me that I now need to set the property identifier_normalizer as well as the other usual table, primary_key_column, primary_key_length etc.. However I have no idea what value to set for the identifier_normalizer. I can't find any documentation for this new field.

This is my code for setting up the generator:
Code:
        Properties props = new Properties();
        props.put("max_lo", "0");
        props.put("table", "MYTABLE");
        props.put("primary_key_column", "MYTABLECOLUMN1");
        props.put("primary_key_length", "18");
        props.put("value_column", "MYTABLECOLUMN2");
        props.put("identifier_normalizer", WHAT TO PUT HERE);

        Dialect dialect = (Dialect) Class.forName("org.hibernate.dialect.Oracle10gDialect").newInstance();
       
        MultipleHiLoPerTableGenerator agrGenerator = new MultipleHiLoPerTableGenerator();
        props.put("primary_key_value", "PARAMNAME1");
        agrGenerator.configure(Hibernate.LONG, props, dialect);


Top
 Profile  
 
 Post subject: Re: Needed props for configuring a MultipleHiLoPerTableGenerator
PostPosted: Sat Oct 01, 2011 4:58 am 
Newbie

Joined: Sat Sep 03, 2011 4:46 am
Posts: 6
I'm having the exact same problem right now. Please answer.
Where can I find examples for the configuration?
Isn't there a tutorial?
Any books with examples on this?

I really need to get a native Generator going, for providing natively generated IDs for my CustomGenerator.


Top
 Profile  
 
 Post subject: Re: Needed props for configuring a MultipleHiLoPerTableGenerator
PostPosted: Mon Nov 14, 2011 7:00 pm 
Newbie

Joined: Sun Sep 12, 2010 8:46 pm
Posts: 3
any pointer to any solutions for this issue


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.