Incorrect audit entity for TABLE_PER_CLASS with abstract classes (results in query error)
-----------------------------------------------------------------------------------------
Key: HHH-4744
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4744
Project: Hibernate Core
Issue Type: Bug
Components: envers
Affects Versions: 3.5.0-Beta-2, 3.2.0.ga
Reporter: Volker Schmidt
Attachments: envers-1.2.2.ga-hibernate-3.3.patch, trunk.patch
The configuration code of Envers does not check the abstract flag of a PersistentClass. Thus the created audit entity is not declared as being abstract. Abstract entities do not have concrete tables. Without declaring the audit entity of a super class as being abstract, queries include a table (that does not exist) for the abstract super class.
I have added a patch for the trunk and for Envers 1.2.2.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
EntityMetamodel#entityNameByInheritenceClassNameMap mapping from class or class names?
--------------------------------------------------------------------------------------
Key: HHH-4078
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4078
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5
Reporter: Tsering Shrestha
In the constructor of EntityMetaModel (http://anonsvn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/or... revision 15258)
Line 314:
if ( persistentClass.hasPojoRepresentation() ) {
entityNameByInheritenceClassNameMap.put( persistentClass.getMappedClass(), persistentClass.getEntityName() );
However at Line 578:
public String findEntityNameByEntityClass(Class inheritenceClass) {
return ( String ) entityNameByInheritenceClassNameMap.get( inheritenceClass.getName() );
}
Why are we using java.lang.Class as the keys when we put new entries to the map but try to read with java.lang.String keys?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
It is impossible to override RelationTargetAuditMode using AuditOverride
------------------------------------------------------------------------
Key: HHH-4438
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4438
Project: Hibernate Core
Issue Type: Bug
Components: envers
Affects Versions: 3.5.0.Beta-1, 3.3.2, 3.3.x, 3.5
Reporter: Eugene Goroschenya
The implementation of HHH-4010 provides great feature: support auditing of entity having reference (many-to-one relation) to not audited entity
But it is still impossible to use it with @Embedded to override RelationTargetAuditMode for some reference(s) in @Embeddable class.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
OneToMany cascadeType.ALL change collection and merge - does not remove entities
---------------------------------------------------------------------------------
Key: HHH-4626
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4626
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.3.1
Environment: JBoss 5.1.0.GA, FC 10, Java 1.6
Reporter: Dave
public Class Foo {
@OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.ALL}, mappedBy="foo")
public List<Bar> getBars() {
return bars;
}
}
// aFoo is persited
Foo aFoo = ...
aFoo.getBars().remove(0); // remove the first
aFoo.getBars().add(aBar); // add new one
em.merge(aFoo);
For cascade={CascadeType.ALL}, it works for creating/deleting aFoo.
For merge, the new aBar is created, but the bar that was removed from collection are not deleted from persistence.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Remove hasSelfReferentialForeignKeyBug (returning true) override from MySQL dialects
------------------------------------------------------------------------------------
Key: HHH-3940
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3940
Project: Hibernate Core
Issue Type: Task
Components: core
Affects Versions: 3.3.1, 3.2.7
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.2.x, 3.3.x, 3.5
Previous versions of MySQL had a nasty bug when using self-referential foreign keys with the innodb storage engine. This Dialect#hasSelfReferentialForeignKeyBug was originally added to account for that.
Testing against the lastest (5.1) MySQL versions shows this to no longer be present.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Cleanup test data
-----------------
Key: HHH-3995
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3995
Project: Hibernate Core
Issue Type: Task
Components: testsuite
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Priority: Minor
Fix For: 3.2.x, 3.3.x, 3.5
Lots of tests are leaving test data hanging around. That works on a particular assumption wrt the execution order of tests or that only a single test method exists. That cuases problems later in many cases. All tests should clean up the test data they create. Currently on trunk I see 246 tests leaving data around.
The sys prop hibernate.test.validateDataCleanup can be used to check for this; set it to true.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
delay IDENTITY insertions in the case of FlushMode.MANUAL/NEVER
---------------------------------------------------------------
Key: HHH-2439
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2439
Project: Hibernate3
Type: Improvement
Components: core
Reporter: Steve Ebersole
Assigned to: Steve Ebersole
Fix For: 3.2.3
Much like we do now in 3.2 for out of transaction operations, we should delay performing insertions for post-insert generators with FlushMode.isManualFlushMode
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Leverage new o.h.dialect.function.TrimFunctionTemplate and o.h.dialect.function.AnsiTrimFunction classes
--------------------------------------------------------------------------------------------------------
Key: HHH-4706
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4706
Project: Hibernate Core
Issue Type: Improvement
Components: core, query-hql
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.5
o.h.dialect.function.TrimFunctionTemplate defines basic support for understanding which trim options were specified.
o.h.dialect.function.AnsiTrimFunction defines rendering of a trim function using the ANSI SQL defined syntax.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Test FooBarTest isn't opening transactions and contains an invalid assertion
----------------------------------------------------------------------------
Key: HHH-3946
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3946
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Reporter: Juraci Paixao Krohling
Assignee: Juraci Paixao Krohling
Fix For: 3.5
Attachments: FooBarTest.java.diff
Test FooBarTest have three tests failing:
- testDisconnect
- testOrderBy
- testVeto
All of them are issuing commit to transactions which were not started, causing "Transaction not successfully started" error. Also, the test testOrderBy contains an invalid assertion. The code reads:
assertEquals( "'b' isn't second element", "b", ( (One) results.get(2) ).getValue() );
But as the method "get" is 0-indexed, the parameter should be 1, instead of 2.
The attached patch fixes those issues.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
skip org.hibernate.action.BulkOperationCleanupAction on INSERT HQL queries
--------------------------------------------------------------------------
Key: HHH-4035
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4035
Project: Hibernate Core
Issue Type: Improvement
Components: caching (L2)
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.3.x, 3.5
For INSERT queries it is really not needed to cleanup caches as we'd have no invalid entity/collection data to cleanup (we'd still nee to invalidate the appropriate update-timestamps regions) as a result of the query.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira