Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368345

Summary: Add support for pooled-lo sequence optimizer and support to specify a optimizer class
Product: [Modeling] EMF Reporter: Krasimir Chobantonov <kchobantonov>
Component: TeneoAssignee: Martin Taal <mtaal>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Krasimir Chobantonov CLA 2012-01-11 09:08:12 EST
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.
Comment 1 Martin Taal CLA 2012-01-26 13:43:12 EST
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
Comment 2 Krasimir Chobantonov CLA 2012-01-26 14:29:11 EST
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
Comment 3 Martin Taal CLA 2012-01-26 14:32:33 EST
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
Comment 4 Krasimir Chobantonov CLA 2012-01-26 22:00:57 EST
yes that would be great.
Comment 5 Martin Taal CLA 2012-01-30 06:03:42 EST
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.
Comment 6 Martin Taal CLA 2012-01-30 06:39:59 EST
Build is done and published