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

Improve DefaultFlushEntityEventListener#invokeInterceptor method execution

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.0.Final
    • Fix Version/s: 5.3.1
    • Component/s: hibernate-core
    • Labels:
      None
    • Last commented by a user?:
      true
    • Sprint:

      Description

      boolean isDirty = false;
      if ( entry.getStatus() != Status.DELETED ) {
      	if ( callbackRegistry.preUpdate( entity ) ) {
      		isDirty = copyState( entity, persister.getPropertyTypes(), values, session.getFactory() );
      	}
      }
      
      final boolean answerFromInterceptor =  session.getInterceptor().onFlushDirty(
      				entity,
      				entry.getId(),
      				values,
      				entry.getLoadedState(),
      				persister.getPropertyNames(),
      				persister.getPropertyTypes()
      		);
      
      return answerFromInterceptor || isDirty;
      

      when isDirty == true the answerFromInterceptor check can be avoided

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: