-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HHH-16049 Setting a property to its current value with bytecode enhancement enabled results in unnecessary SQL Update in some (many) cases #5967
Conversation
…tter test reports
…enhancement enabled
@@ -20,7 +20,7 @@ | |||
Object b) { | |||
final PersistentAttributeInterceptor persistentAttributeInterceptor = persistentAttributeInterceptable.$$_hibernate_getInterceptor(); | |||
if ( persistentAttributeInterceptor != null | |||
&& !persistentAttributeInterceptor.getInitializedLazyAttributeNames().contains( fieldName ) ) { | |||
&& !persistentAttributeInterceptor.isAttributeLoaded( fieldName ) ) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
@@ -33,7 +33,7 @@ | |||
boolean b) { | |||
final PersistentAttributeInterceptor persistentAttributeInterceptor = persistentAttributeInterceptable.$$_hibernate_getInterceptor(); | |||
if ( persistentAttributeInterceptor != null | |||
&& !persistentAttributeInterceptor.getInitializedLazyAttributeNames().contains( fieldName ) ) { | |||
&& !persistentAttributeInterceptor.isAttributeLoaded( fieldName ) ) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
@@ -46,7 +46,7 @@ | |||
byte b) { | |||
final PersistentAttributeInterceptor persistentAttributeInterceptor = persistentAttributeInterceptable.$$_hibernate_getInterceptor(); | |||
if ( persistentAttributeInterceptor != null | |||
&& !persistentAttributeInterceptor.getInitializedLazyAttributeNames().contains( fieldName ) ) { | |||
&& !persistentAttributeInterceptor.isAttributeLoaded( fieldName ) ) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
@@ -59,7 +59,7 @@ | |||
short b) { | |||
final PersistentAttributeInterceptor persistentAttributeInterceptor = persistentAttributeInterceptable.$$_hibernate_getInterceptor(); | |||
if ( persistentAttributeInterceptor != null | |||
&& !persistentAttributeInterceptor.getInitializedLazyAttributeNames().contains( fieldName ) ) { | |||
&& !persistentAttributeInterceptor.isAttributeLoaded( fieldName ) ) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
@@ -72,7 +72,7 @@ | |||
char b) { | |||
final PersistentAttributeInterceptor persistentAttributeInterceptor = persistentAttributeInterceptable.$$_hibernate_getInterceptor(); | |||
if ( persistentAttributeInterceptor != null | |||
&& !persistentAttributeInterceptor.getInitializedLazyAttributeNames().contains( fieldName ) ) { | |||
&& !persistentAttributeInterceptor.isAttributeLoaded( fieldName ) ) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
@@ -85,7 +85,7 @@ | |||
int b) { | |||
final PersistentAttributeInterceptor persistentAttributeInterceptor = persistentAttributeInterceptable.$$_hibernate_getInterceptor(); | |||
if ( persistentAttributeInterceptor != null | |||
&& !persistentAttributeInterceptor.getInitializedLazyAttributeNames().contains( fieldName ) ) { | |||
&& !persistentAttributeInterceptor.isAttributeLoaded( fieldName ) ) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
@@ -98,7 +98,7 @@ | |||
long b) { | |||
final PersistentAttributeInterceptor persistentAttributeInterceptor = persistentAttributeInterceptable.$$_hibernate_getInterceptor(); | |||
if ( persistentAttributeInterceptor != null | |||
&& !persistentAttributeInterceptor.getInitializedLazyAttributeNames().contains( fieldName ) ) { | |||
&& !persistentAttributeInterceptor.isAttributeLoaded( fieldName ) ) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
@@ -111,7 +111,7 @@ | |||
float b) { | |||
final PersistentAttributeInterceptor persistentAttributeInterceptor = persistentAttributeInterceptable.$$_hibernate_getInterceptor(); | |||
if ( persistentAttributeInterceptor != null | |||
&& !persistentAttributeInterceptor.getInitializedLazyAttributeNames().contains( fieldName ) ) { | |||
&& !persistentAttributeInterceptor.isAttributeLoaded( fieldName ) ) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
@@ -124,7 +124,7 @@ | |||
double b) { | |||
final PersistentAttributeInterceptor persistentAttributeInterceptor = persistentAttributeInterceptable.$$_hibernate_getInterceptor(); | |||
if ( persistentAttributeInterceptor != null | |||
&& !persistentAttributeInterceptor.getInitializedLazyAttributeNames().contains( fieldName ) ) { | |||
&& !persistentAttributeInterceptor.isAttributeLoaded( fieldName ) ) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
…enhancement enabled
…cement enabled results in unnecessary SQL Update in some (many) cases
331515b
to
8005807
Compare
Nice, looks like my workaround (using interceptor) was correct using isAttributeLoaded. Thank you for working on this! <3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
https://hibernate.atlassian.net/browse/HHH-16049