-
Notifications
You must be signed in to change notification settings - Fork 92
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
Upgrade Hibernate ORM to 6.6.0.CR2 #1969
Conversation
for (int i = 0; i < cascadeStyles.length; i++) { | ||
if ( cascadeStyles[i].doCascade( action.delegate() ) ) { | ||
Object fetchable = state[i]; | ||
if ( !Hibernate.isInitialized( fetchable ) ) { | ||
beforeDelete = beforeDelete.thenCompose( v -> session.unwrap(ReactiveSession.class).reactiveFetch( fetchable, true ) ); | ||
beforeDelete = beforeDelete.thenCompose( v -> session |
Check notice
Code scanning / CodeQL
Useless parameter
|
||
if ( traceEnabled ) { | ||
LOG.tracev( "Done cascade {0} for collection: {1}", action, collectionType.getRole() ); | ||
} | ||
|
||
final Iterator<?> itr = action.getCascadableChildrenIterator( eventSource, collectionType, child ); | ||
return loop( itr, (value, integer) -> cascadeProperty( |
Check notice
Code scanning / CodeQL
Useless parameter
return loop( orphans, Objects::nonNull, orphan -> { | ||
LOG.tracev( "Deleting orphaned entity instance: {0}", entityName ); | ||
return session.reactiveRemove( entityName, orphan, false, DeleteContext.create() ); | ||
} ); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
instanceof PostDeleteEventListenerStandardImpl); | ||
|| fss.eventListenerGroup_POST_DELETE.count() > 1 | ||
|| fss.eventListenerGroup_POST_DELETE.count() == 1 | ||
&& !( fss.eventListenerGroup_POST_DELETE.listeners().iterator().next() |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
persister, entity, transientEntities, session | ||
).cascade() | ||
return fetchLazyAssociationsBeforeCascade( CascadingActions.REMOVE, persister, entity, session ) | ||
.thenCompose( v -> Cascade.cascade( |
Check notice
Code scanning / CodeQL
Useless parameter
/** | ||
* @since 2.4 (and Hibernate ORM 6.6) | ||
*/ | ||
public <T, R> CompletionStage<T> executeQuery( |
Check notice
Code scanning / CodeQL
Missing Override annotation
.injectInterceptor( data.getEntityInstanceForNotify(), entityIdentifier, session ); | ||
} | ||
} | ||
data.getConcreteDescriptor().setPropertyValues( data.getEntityInstanceForNotify(), resolvedEntityState ); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation
return !( initializer instanceof EntityDelayedFetchInitializer ) && !( initializer instanceof EntitySelectFetchInitializer ); | ||
} | ||
|
||
ReactiveInitializersList build(final Map<NavigablePath, Initializer> initializerMap) { | ||
ReactiveInitializersList build(final Map<NavigablePath, Initializer<?>> initializerMap) { |
Check notice
Code scanning / CodeQL
Useless parameter
@Override | ||
public List<Initializer> getInitializers() { | ||
throw new UnsupportedOperationException(); | ||
private void afterRow(RowProcessingState rowProcessingState) { |
Check notice
Code scanning / CodeQL
Useless parameter
@Override | ||
public R readRow(RowProcessingState rowProcessingState, JdbcValuesSourceProcessingOptions options) { | ||
throw LOG.nonReactiveMethodCall( "reactiveRowReader" ); | ||
private CompletionStage<Void> coordinateInitializers(RowProcessingState rowProcessingState) { |
Check notice
Code scanning / CodeQL
Useless parameter
71ca1b2
to
f17f5fe
Compare
I need some changes in ORM before I can support it for native queries.
We didn't include it in the past because we wanted to keep the examples simpler. But, we need to be able to test the examples with the snapshots and it's disabled on the `main` branch as default
To make this work I had to refactor the Cascade class. I don't know what wasn't working, but a test was failing and couldn't figure out what was wrong. I think the class now is more similar to the one in Hibernate ORM, it's easier to debug, logs the messages in the correct order, and it fixes the issues I had.
f17f5fe
to
6fc8164
Compare
Fix #1949