Skip to content
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

Merged
merged 6 commits into from
Aug 6, 2024

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented Aug 6, 2024

Fix #1949

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

The parameter 'v' is never used.

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

The parameter 'integer' is never used.
Comment on lines +710 to +713
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

Invoking [CompletionStages.loop](1) should be avoided because it has been deprecated.
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

Invoking [EventListenerGroup.listeners](1) should be avoided because it has been deprecated.
persister, entity, transientEntities, session
).cascade()
return fetchLazyAssociationsBeforeCascade( CascadingActions.REMOVE, persister, entity, session )
.thenCompose( v -> Cascade.cascade(

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'v' is never used.
/**
* @since 2.4 (and Hibernate ORM 6.6)
*/
public <T, R> CompletionStage<T> executeQuery(

Check notice

Code scanning / CodeQL

Missing Override annotation

This method overrides [ReactiveSelectExecutor.executeQuery](1); it is advisable to add an Override annotation.
.injectInterceptor( data.getEntityInstanceForNotify(), entityIdentifier, session );
}
}
data.getConcreteDescriptor().setPropertyValues( data.getEntityInstanceForNotify(), resolvedEntityState );

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [EntityPersister.setPropertyValues](1) should be avoided because it has been deprecated.
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

The parameter 'initializerMap' is never used.
@Override
public List<Initializer> getInitializers() {
throw new UnsupportedOperationException();
private void afterRow(RowProcessingState rowProcessingState) {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'rowProcessingState' is never used.
@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

The parameter 'rowProcessingState' is never used.
@DavideD DavideD force-pushed the orm-6.6.CR2-release branch from 71ca1b2 to f17f5fe Compare August 6, 2024 15:40
DavideD added 6 commits August 6, 2024 17:51
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.
@DavideD DavideD force-pushed the orm-6.6.CR2-release branch from f17f5fe to 6fc8164 Compare August 6, 2024 15:51
@DavideD DavideD merged commit fbcde99 into hibernate:main Aug 6, 2024
5 of 20 checks passed
@DavideD DavideD deleted the orm-6.6.CR2-release branch August 7, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Hibernate ORM to 6.6.0.CR2
1 participant