Issues
- Hibernate increases version on readHHH-5867Resolved issue: HHH-5867Strong Liu
- A @ManyToOne field on the same entity class is null when 2nd level cache is enabledHHH-5087Resolved issue: HHH-5087Former user
- In the Session.flush method has a lost of perfomance about 50% when flush a large amout of dataHHH-5062Juraci Paixão Kröhling
- EventListenerConfigurator uses Ejb3Configuration but could use AnnotationConfiguration insteadHHH-5052Resolved issue: HHH-5052Emmanuel Bernard
- @TableGenerator throws Unsupported exception - error performing isolated workHHH-5019Resolved issue: HHH-5019
- ClassCastException with parameter as CASE resultsHHH-4700Resolved issue: HHH-4700Steve Ebersole
- one-to-one non-lazy loading but Filters Not Applied.HHH-4026Resolved issue: HHH-4026Steve Ebersole
- <join>: <key>: different composite keyHHH-4024
- One-to-one: property-ref: foreign key: composite-idHHH-4014Resolved issue: HHH-4014
- Criteria on alias causes partial collection materializationHHH-3872Resolved issue: HHH-3872
- Hibernate proxies Groovy's getMetaClass method breaking proxies when used with GroovyHHH-3870Resolved issue: HHH-3870Vlad Mihalcea
- Bug: No ability to escape SQL keywords in HQL queries.HHH-3811Resolved issue: HHH-3811
- Error with sql generated for set of subclass A in a peer subclass B.HHH-3752Resolved issue: HHH-3752Former user
- ManyToOneType.isModifiedHHH-3730Resolved issue: HHH-3730
- Add setReadOnly(true) method to the Criteria interfaceHHH-3578Resolved issue: HHH-3578Former user
- Bugs in some Criteria-Expressions!HHH-3415Resolved issue: HHH-3415
- Dead code in 3.3.0 CR1HHH-3411Resolved issue: HHH-3411
- ResultTransformers need smarter equals() and hashCode() implsHHH-3409Resolved issue: HHH-3409Steve Ebersole
- new ResultSetTransformer which converts a two columns of a result set into one big HashMap.HHH-3403Resolved issue: HHH-3403
- Query Cache entries are not distributableHHH-3392Resolved issue: HHH-3392Steve Ebersole
- Hibernate 3.3.0 CR1 has a dependency of java 1.5. Integer.valueOf(int) is called in some places.HHH-3386Resolved issue: HHH-3386Diego Plentz
- uniqueConstraints={@UniqueConstraint does not work inside the @JoinTableHHH-3384Resolved issue: HHH-3384
- QueryKey is storing references to entities instead of identifiersHHH-3383Resolved issue: HHH-3383Steve Ebersole
- Subqueries in Criteria-API use wrong table aliasHHH-3376Resolved issue: HHH-3376Diego Plentz
- Let the proxy extends the most possible lower class in a class heirarchyHHH-3369Resolved issue: HHH-3369
- Filter definition parameter type doesn't allow custom typesHHH-3368Resolved issue: HHH-3368
- SchemaUpdate still fails if conflicting table is visible in another user's tablespaceHHH-3365Resolved issue: HHH-3365
- Missing table name + alias in FROM clause of generated SQLHHH-3364Resolved issue: HHH-3364Diego Plentz
- Invalid SQL: missing join and columnHHH-3363Resolved issue: HHH-3363
- LazyInitializationException generate an error message in the logsHHH-3361Resolved issue: HHH-3361
- Custom Oracle Batcher to allow batch updates for versioned dataHHH-3360Resolved issue: HHH-3360Steve Ebersole
- Loader leaks memory when ResultSet wrapping is enabledHHH-3359Resolved issue: HHH-3359Strong Liu
- New id generator - produce fixed-width string representation of short, int, or longHHH-3346Resolved issue: HHH-3346
- Get rid of TransactionManager compatibility check in CacheInstanceManager implsHHH-3340Resolved issue: HHH-3340Brian Stansberry
- Cascade-save breaks if parent ID is assigned (delays insert) and child has identity ID (early insert) (Wallace Wadge)HHH-3334Resolved issue: HHH-3334Former user
- JPA Max/Min aggregate functions do not return same state-field type when argument is a java.sql.TimestampHHH-3320Resolved issue: HHH-3320
- Provide access to protected values of DatasourceConnectionProvider for HEMHHH-3287Resolved issue: HHH-3287
- Move ACTION_PERSIST_SKIPLAZY from HEM to Core in CascadingActionHHH-3286Emmanuel Bernard
- Allow <comment> sub-element to <timestamp>HHH-3274Resolved issue: HHH-3274
- using of Integer.valueOf(int), which is not available in JDK 1.4HHH-3272Resolved issue: HHH-3272Diego Plentz
- follow up on documentation license questionsHHH-3270Resolved issue: HHH-3270Steve Ebersole
- upgrade to jDocBook plugin version 2.1.1HHH-3269Resolved issue: HHH-3269Steve Ebersole
- distribution bundle missing javassist dependencyHHH-3268Resolved issue: HHH-3268Steve Ebersole
- distribution bundle missing cglib dependency (and its asm transitive deps)HHH-3267Resolved issue: HHH-3267Steve Ebersole
- distribution bundle missing jta dependencyHHH-3266Resolved issue: HHH-3266Steve Ebersole
- change license url in pom to http://www.gnu.org/licenses/lgpl-2.1.htmlHHH-3265Resolved issue: HHH-3265Steve Ebersole
- Do not wrap exceptions raised by event listeners (at init or destroy time)HHH-3261Resolved issue: HHH-3261Steve Ebersole
- Hibernate wraps a listener init or destroy exception into an AssertionFailureHHH-3260Resolved issue: HHH-3260
- Content images not displayedHHH-3257Resolved issue: HHH-3257Steve Ebersole
- Retrieve right type of generic propertyHHH-3252
50 of 68
Hibernate increases version on read
Rejected
Description
Attachments
1
Details
Assignee
Strong LiuStrong LiuReporter
ChristianChristianComponents
Affects versions
Priority
Critical
Details
Details
Assignee
Strong Liu
Strong LiuReporter
Christian
ChristianComponents
Affects versions
Priority
Created January 25, 2011 at 8:43 AM
Updated March 7, 2014 at 5:31 PM
Resolved May 20, 2011 at 7:30 AM
Activity
Show:
Brett MeyerMarch 7, 2014 at 5:31 PM
Bulk closing rejected tickets in "resolved" state.
Strong LiuMay 20, 2011 at 7:30 AM
it is not a bug, this is caused by your own custom type impl.
hibernate use equals to check if a property is changed (aka dirty).
in your test, the MyComponent#type is null, and with your ShortEnumUserType#equals, it returns false if the type is null,
so, you actually tell hibernate if the type is null, then the managed entity is dirty, that's why hibernate schedule a update.
add
On a special constellation hibernate increases the internal used version of an entity on a read operation. For example if you save an entity the version is initial set. If you execute a query to read the entity afterwards, the version increases on this read. Please notice that the entity has NOT changed in the meantime. An update of the version must not happen here.
This problem seems to occur only if you have a few prequisites:
1. An entity, which has a component or subclasses
2. The component/subclasses must use an custom usertype
3. The read operation is covered by transaction
The bug leads to StaleObjectStateExceptions in production because the version has changed after a read operation by another thread.
An example is attached.