Uploaded image for project: 'Hibernate ORM'
  1. Hibernate ORM
  2. HHH-5218

Provide a new "pooled value" based optimizer which interprets the database value as the low boundary instead of upper boundary

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.6
    • Fix Version/s: 3.5.2, 3.6.0.Beta1
    • Component/s: hibernate-core
    • Labels:
      None
    • Last commented by a user?:
      true

      Description

      Splitting up HHH-3608 into its individual tasks. This part deals with the assumption made in PooledOptimizer that the sequence value is the upper boundary of the current range of values. This is an assumption and the other assumption that the value is the lower boundary is just as valid, so provide for both by adding a new optimizer. The new optimizer class will be org.hibernate.id.enhanced.OptimizerFactory.PooledLoOptimizer and its short name will be "pooled-lo". The already existing one will remain the default, but I will add a config option to allow users to specify which to use per setup ('hibernate.id.prefer_pooling_lo_values').

        Issue Links

          Activity

          Hide
          steve Steve Ebersole added a comment -

          Here is the setting I ended up going with:

          /**
           * When using pooled {@link org.hibernate.id.enhanced.Optimizer optimizers}, prefer interpreting the 
           * database value as the lower (lo) boundary.  The default is to interpret it as the high boundary.
           */
          public static final String PREFER_POOLED_VALUES_LO = "hibernate.id.optimizer.pooled.prefer_lo";
          
          Show
          steve Steve Ebersole added a comment - Here is the setting I ended up going with: /** * When using pooled {@link org.hibernate.id.enhanced.Optimizer optimizers}, prefer interpreting the * database value as the lower (lo) boundary. The default is to interpret it as the high boundary. */ public static final String PREFER_POOLED_VALUES_LO = "hibernate.id.optimizer.pooled.prefer_lo" ;
          Hide
          steve Steve Ebersole added a comment -

          On 3.5 + HBM, make sure this is set prior to binding the metadata.

          Show
          steve Steve Ebersole added a comment - On 3.5 + HBM, make sure this is set prior to binding the metadata.

            People

            • Assignee:
              steve Steve Ebersole
              Reporter:
              steve Steve Ebersole
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h 11m
                3h 11m

                  Development