[hibernate-dev] BoostStrategy issues

Hardy Ferentschik hibernate at ferentschik.de
Fri Dec 4 10:51:51 EST 2009


On Fri, 04 Dec 2009 12:35:51 -0300, Emmanuel Bernard
<emmanuel at hibernate.org> wrote:

> But then, would it make sense to reuse @Boost instead of a separated  
> annotation as it is today?

The main reason for using an explicit @Dynamic boost was to be more
explicit.
Using @Boost means we need to add another parameter 'boostStrategyImpl'
which would
default to DefaultBoostStrategy.

The question is then what you do if someone specifies a boost value, eg
2.0f together
with a CustomBoostStrategy? Throw an exception, print a warning, apply
both? I guess
we would have to apply both, so effectively you define two boost values
with the same
annotation.

Both solutions - standalone @DynamicBoost or dynamic boosting rolled into
@Boost - have
their pro and cons. Personally I lean towards @DynamicBoost at the moment.

--Hardy



More information about the hibernate-dev mailing list