id « Interceptor « JPA Q&A





1. Interceptor and Class-IDs.    forum.hibernate.org

public class DBInterceptor implements Interceptor, Serializable { .... public Object instantiate(final Class clazz, final Serializable serial) throws CallbackException { return StorageFactoryFactory. getFactory().newObject(ObjectState.RESTORE, clazz); ...

3. Interceptor to Change the ID generation    forum.hibernate.org

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 = ...