Igor Orlov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5f5d20e...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiY2M2MWM2N2E5...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-17045?atlOrigin=eyJpIjoiY2M2MW...
) HHH-17045 (
https://hibernate.atlassian.net/browse/HHH-17045?atlOrigin=eyJpIjoiY2M2MW...
) Unable to locate parameter for RESTRICT - UPDATE error when updating entity with RowId (
https://hibernate.atlassian.net/browse/HHH-17045?atlOrigin=eyJpIjoiY2M2MW...
)
Issue Type: Bug Affects Versions: 6.2.7 Assignee: Unassigned Attachments:
JPAUnitTestCase.java Components: hibernate-core Created: 08/Aug/2023 04:23 AM Environment:
Spring Boot 3.2.0
Hibernate 6.2.7
JDK 17 / 19 Labels: rowid Priority: Major Reporter: Igor Orlov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5f5d20e...
)
We recive the folowing error when we update the entity with the @RowID annotation wich is
already stored in DB:
Unable to locate parameter `RelatedSecondaryEntity.id` for RESTRICT - UPDATE :
org.hibernate.bugs.RelatedSecondaryEntity
UnknownParameterException(`RelatedSecondaryEntity.id` for RESTRICT - UPDATE :
o.h.b.RelatedSecondaryEntity)
at
org.hibernate.engine.jdbc.mutation.internal.JdbcValueBindingsImpl.bindValue(JdbcValueBindingsImpl.java:60)
at
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.lambda$breakDownKeyJdbcValues$12(UpdateCoordinatorStandard.java:868)
at
org.hibernate.persister.entity.mutation.EntityTableMapping$KeyMapping.lambda$breakDownKeyJdbcValues$0(EntityTableMapping.java:234)
at org.hibernate.type.BasicType.forEachDisassembledJdbcValue(BasicType.java:135)
at
org.hibernate.metamodel.mapping.internal.BasicEntityIdentifierMappingImpl.forEachDisassembledJdbcValue(BasicEntityIdentifierMappingImpl.java:398)
at org.hibernate.metamodel.mapping.Bindable.forEachJdbcValue(Bindable.java:197)
at org.hibernate.metamodel.mapping.Bindable.forEachJdbcValue(Bindable.java:181)
at
org.hibernate.persister.entity.mutation.EntityTableMapping$KeyMapping.breakDownKeyJdbcValues(EntityTableMapping.java:230)
at
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.breakDownKeyJdbcValues(UpdateCoordinatorStandard.java:865)
at
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.lambda$decomposeForUpdate$10(UpdateCoordinatorStandard.java:798)
at
org.hibernate.sql.model.internal.MutationOperationGroupSingle.forEachOperation(MutationOperationGroupSingle.java:70)
at
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.decomposeForUpdate(UpdateCoordinatorStandard.java:796)
at
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.doStaticUpdate(UpdateCoordinatorStandard.java:730)
at
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.performUpdate(UpdateCoordinatorStandard.java:313)
at
org.hibernate.persister.entity.mutation.UpdateCoordinatorStandard.coordinateUpdate(UpdateCoordinatorStandard.java:231)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2726)
at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:166)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:633)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:502)
at
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:358)
at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
at
org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1412)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1398)
at
org.hibernate.bugs.JPAUnitTestCase.errorDuringUpdatingRelatedEntityFieldInDifferentTransactions(JPAUnitTestCase.java:75)
at
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Test cases with error reprodusing for the single entity and for related entities are
attached.
(
https://hibernate.atlassian.net/browse/HHH-17045#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-17045#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:7fb7fe8 )