Community
Participate
Working Groups
Build Identifier: 1.2.0.v201111160433 Hibernate 3.6 supports new optimizer - pooled-lo - we need to add a new option to the teneo OptimizerType Also we need a way to specify directly an optimizer class name if we do not want to use predefined optimizers Reproducible: Always Steps to Reproduce: 1.This is a new feature 2. 3.
Working on this, a question from my side, how does the mapping look like if you want to specify a custom optimizer class? Can you provide an example mapping for this? gr. Martin
in the generator paramters instead of none, hilo, legacy-hilo,pooled,pooled-lo you specify the class name Hibernate has a mapping for none, hilo, legacy-hilo, pooled, pooled-lo that specified the actual class so that in the parameter value you can use those instead of specifying the full class name Take a look at org.hibernate.id.enhanced.OptimizerFactory method buildOptimizer so the mapping is the same just the parameter value is not hilo for example but the full class name of the optimizer let me know if you do have more questions. Krasimir (In reply to comment #1) > Working on this, a question from my side, how does the mapping look like if you > want to specify a custom optimizer class? > Can you provide an example mapping for this? > > gr. Martin
Okay, the problem is that the optimizer in teneo is an enum with a fixed set of values So the only solution I can offer is add a optimizerClass as an extra annotation attribute, which is then used as the optimizer value. This would work for you? gr. Martin
yes that would be great.
Pushed to git, will be in next build The optimizerclass attribute has been added, but is not tested, please test after the build has become available.
Build is done and published