Ruslan Masjuk (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZTBmZjRiZTcx...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-17036?atlOrigin=eyJpIjoiZTBmZj...
) HHH-17036 (
https://hibernate.atlassian.net/browse/HHH-17036?atlOrigin=eyJpIjoiZTBmZj...
) Issue HHH-16701 is still reproducible (
https://hibernate.atlassian.net/browse/HHH-17036?atlOrigin=eyJpIjoiZTBmZj...
)
Change By: Ruslan Masjuk (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
[
https://github.com/homiodev/homio-app/blob/5b9cd33017a8ad93f715600c97aec0...]
The above line of code throws “persister” is null.
Please, take into account that method beforeDelete(…) executes by:
{code:java}EventListenerRegistry registry =
sessionFactory.getServiceRegistry().getService(EventListenerRegistry.class);
registry.getEventListenerGroup(EventType.PRE_DELETE).appendListener(event -> {
Object entity = event.getEntity();
if (entity instanceof BaseEntity baseEntity) {
if (baseEntity.isDisableDelete()) {
throw new IllegalStateException("Unable to remove entity");
}
baseEntity.beforeDelete(entityContext);
}
return false;
});{code}
Also, calling TransactionSynchronizationManager.isActualTransactionActive() return true
As a workaround, I have to fully initialize lazy collections by calling
[
https://github.com/homiodev/homio-app/blob/5b9cd33017a8ad93f715600c97aec0...]
before calls: em.remove(entity)
Sorry that I have not time to create full showcase
(
https://hibernate.atlassian.net/browse/HHH-17036#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-17036#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100233- sha1:06f5c37 )