Issues
- The return value of st_envelope() is not recognised as a geometry type on MariaDBHHH-19254Karel Maesen
- deprecate use of lifecycle callbacks on embeddablesHHH-19253Resolved issue: HHH-19253Gavin King
- overriding @Id generation declared by @MappedSuperclassHHH-19252Resolved issue: HHH-19252Gavin King
- Use the "temp classloader" model to always build hibernate-modelsHHH-19251
- HHHHHH-19250Resolved issue: HHH-19250
- Issue with orphanRemoval = true and FetchType.LAZY in Hibernate 6.6.X.FinalHHH-19249
- Return of deleted entities doesn't work with naturalid multiloadingHHH-19248Jan Schatteman
- Make it possible to order type contributions analogous to function contributionsHHH-19247
- Fetch join makes partially covered EntityGraph ineffectiveHHH-19246Resolved issue: HHH-19246Christian Beikov
- Make unary and binary operators easier to extendHHH-19245
- ConnectionReleaseMode.AFTER_STATEMENT ineffective for queriesHHH-19244
- jpa/core/convert TCK failure caused by "AttributeConverter' not allowed for attribute 'getId' annotated '@jakarta.persistence.Id' (use '@Convert(disableConversion=true)' to suppress this error)"HHH-19243
- EntityGraph.addSubgraph fails on entity attribute with more than one level of inheritanceHHH-19242
- Investigate proper bytecode enhancement of attributes with PROPERTY accessHHH-19241
- Significant increase in heap allocation for queries after migrating Hibernate ORM 6.5 to 6.6HHH-19240
- Ensure and validate explicit @Access annotation value on fields / gettersHHH-19239
- order_inserts doesn't consider primary keysHHH-19238
- Expand graph language to optionally specify entityHHH-19237Resolved issue: HHH-19237Steve Ebersole
- PersistenceConfiguration.SCHEMAGEN_CREATE_TARGET doesn't seem to workHHH-19236
- Ability to eager batch fetch associations based on non-pk fkHHH-19235
- Ability to configure cursor holdabiltyHHH-19234Resolved issue: HHH-19234
- AssertionError after Upgrade to Hibernate 6.6.8HHH-19233
- BeanValidationEventListener not called if only associated collection is updated via getterHHH-19232Resolved issue: HHH-19232Marco Belladelli
- Composite User Types provided through TypeContributor are incorrectly registeredHHH-19231
- Ensure that thread local for org.hibernate.bytecode.enhance.internal.bytebuddy.SafeCacheProvider + OverridingClassFileLocator are completely clearedHHH-19230Christian Beikov
- Faster checks in ReflectHelperHHH-19229Olivier Bourgain
- Upgrade MySQL testing to version 9.2HHH-19228
- errors in class OracleSDOFunctionDescriptorsHHH-19227Resolved issue: HHH-19227Karel Maesen
- Remove support for SQL Server versions older than 2016HHH-19226
- Remove support for MariaDB versions older than 10.6HHH-19225
- TransientObjectException on session.remove()HHH-19224
- Upgrade JBoss Logging Tools (processor) to 3.0.4.FinalHHH-19223Marko Bekhta
- SAP Hana - Memory Leak with Identity GenerationHHH-19222
- Dialect catalog separator ignored with not allowed metadata on boot optionHHH-19221
- ClassCastException: class org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer$1 cannot be cast to class java.lang.StringHHH-19220Resolved issue: HHH-19220Andrea Boriero
- Informix Catalog and schema supportHHH-19219Resolved issue: HHH-19219Vladimír Kuruc
- Consider a stronger hashing function for cache keysHHH-19218
- Expose GraphParser#parse on SessionFactoryHHH-19217Resolved issue: HHH-19217Steve Ebersole
- NamedEntityGraph annotation supporting Hibernate parseable formatHHH-19216Resolved issue: HHH-19216Steve Ebersole
- Extends Dialect#addQueryHints to support straight_join syntaxHHH-19215Hogeun Chung
- Record as @IdClass - some tests are failing when record componets of ID class are not alphabetically sorted, but passing when sortedHHH-19214
- Performance decrease for SELECT query with complex WHERE clause in Hibernate 6 (compared with 5)HHH-19213
- Is @EmbeddedId intentionally excluded from Dirty Checking, considering it as immutable?HHH-19212Resolved issue: HHH-19212
- Follow-on-locking silently breaks pessimistic lock semanticsHHH-19211
- Change how the ValidationMode.AUTO behaves (Handle jakarta.validation.NoProviderFoundException)HHH-19210Marko Bekhta
- Verify and fix ID class generation for inner classesHHH-19209Čedomir Igaly
- Javadoc of org.hibernate.cfg.QuerySettings.QUERY_PLAN_CACHE_ENABLED mentions that the query plan cache is disabled by default, but it is enabled by defaultHHH-19208
- JPA OrderBy annotated relation not ordered when using entity graph with criteria apiHHH-19207
- Bytecode-enhanced dirty checking ineffective if entity's embedded ID set manually (to same value)HHH-19206Resolved issue: HHH-19206Christian Beikov
- Do not recreate the validator on each BeanValidationEventListener#validate callHHH-19205Marko Bekhta
50 of
I want Hibernate to manage the order of a list. The time the list is generated, everything seems to work fine. The tables look like I would expect them to look, the items are retrieved in the order they have been saved.
The problem occurs when reordering the item list (removing item and inserting it at another place in the same list). I get the following error (first two lines are test output from my program):
{{MOVE CHILD DATA
One / Two / Three / Four / Five /
Hibernate: delete from ParentData_ChildData where ParentData_id=? and listOrder=?
Hibernate: update ParentData_ChildData set children_id=? where ParentData_id=? and listOrder=?
Mär 12, 2017 11:13:26 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: -104, SQLState: 23505
Mär 12, 2017 11:13:26 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: integrity constraint violation: unique constraint or index violation; UK_9TWN3CBE7SO94343AOP2QKCTC table: PARENTDATA_CHILDDATA
Mär 12, 2017 11:13:26 PM org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl release
INFO: HHH000010: On release of batch it still contained JDBC statements
javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:147)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1413)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1393)
at net.upf.hibtest.HibTest.main(HibTest.java:56)}}
The third line indicates that hibernate tries to set a new children_id for an already existing listOrder position before removing this children_id at the previous listOrder postion and thus duplicationg this id.
Tried two databases (MariaDB on server and local HSQLDB), both gave the same results.
I set up a very basic testcase that can reproduce the behaviour. It consits of three files: parent-entity, child-entity and main()-method. I put my testcase in the attached zip, also containing the hibernate.cfg.xml. Hope this helps to reproduce the problem or see where I got something wrong.
Additional info: I always want to go from parent to child, so I didn't put a reference to the parent into the child (which should be OK, according to some documentation I found) and I understand, that this might not be the fastest solution on earth - but it should at least work somehow.
I kept this short and hope this bug report has all necessary information - for more explanation you also find my question here: https://forum.hibernate.org/viewtopic.php?f=1&t=1044101
I mark this as a blocker to me, since it simply blocks me from getting the task done.
PS: Sorry for any confusion - I uploaded a second src.zip which should make it easier to use the hibernate.cfg.xml file. A also was testing around with the name of the OrderColumn and left the wrong name there in the first version. I can't delete it, so please just ignore the first src.zip