-->
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: Interceptor to Change the ID generation
PostPosted: Sun Dec 28, 2008 4:56 pm 
Newbie

Joined: Sun Dec 28, 2008 4:39 pm
Posts: 1
Need help to solve this problem.
I have hibernate Inteceptor class to change the DB schema at runtime
but it seems to be not working for ID generation. Here is the Code

@Id
@GenericGenerator(name = "generator", strategy = "hilo", parameters =
{@Parameter(name= "table", value= "SomeTable"),
@Parameter(name="schema", value="Dev"),
@Parameter(name="column", value= "ID"),
@Parameter(name="max_lo", value= "10")

}
)
@GeneratedValue(generator="generator")
@Column(name = "Table_CLS_ID", unique = true, nullable = false)
public Long getTableClsId() {

return this.pltClsId;
}

I would like to change @Parameter schma to Prod, or test, to be loaded from properties file, or some other mechnism. How do i do that?


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.