[Hibernate-JIRA] Created: (HHH-5315) AuditJoinTable rows are no longer flushed to the database
by Erik-Berndt Scheper (JIRA)
AuditJoinTable rows are no longer flushed to the database
---------------------------------------------------------
Key: HHH-5315
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5315
Project: Hibernate Core
Issue Type: Bug
Components: envers
Affects Versions: 3.5.2, 3.5.1
Environment: JPA with extended persistence context
Reporter: Erik-Berndt Scheper
Priority: Minor
In Hibernate core 3.5.1 issue HHH-3543 was fixed by using BeforeTransactionCompletionProcess instead of a transaction synchronization. I have found that since this change, rows in AuditJoinTables are no longer flushed to the database. (Envers 3.5.0 final works fine).
I can work around the issue by adding a manual entityManager.flush() or by setting the flushmode to manual.
I have noticed that AuditProcess.java already executes a flush() statement, but this does not seem to suffice. I believe this is caused by the fact that during the doBeforeTransactionCompletion() extra WorkUnits are added to the hibernate ActionQueue (PersistentCollectionChangeWorkUnit) which process the AuditJoinTables.
--
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
14 years, 5 months
[Hibernate-JIRA] Created: (HHH-5212) Alter SQLFunction contract to be more flexible
by Steve Ebersole (JIRA)
Alter SQLFunction contract to be more flexible
----------------------------------------------
Key: HHH-5212
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5212
Project: Hibernate Core
Issue Type: Improvement
Components: core, query-criteria, query-hql
Reporter: Steve Ebersole
The SQLFunction contract currently combines contextual information (render/getReturnType) and non-contextual (aka non-changing) information (hasArguments/hasParenthesesIfNoArguments).
An example I just ran into where separating these would have been nice is in HHH-5173. Some dialects return the argument data type when applying the AVG() function. That is problematic for INTEGER values because the decimal portion gets dropped. On those databases one would need to CAST() the argument to get the correct behavior. However, again, this is only necessary based on the argument type. If the argument type is already a non-integer the cast is uneeded.
Proposal (as always name subject to change/suggestion):
{code}
interface SQLFunction {
public boolean hasArguments();
public boolean hasParenthesesIfNoArguments();
public RenderingContext getRenderingContext(Type columnType, SessionFactoryImplementor factory);
public static interface RenderingContext {
public Type getReturnType();
public String render(List args);
}
}
{code}
I used SessionFactoryImplementor as the argument to getRenderingContext, but the current getReturnType accepts a Mapping. Is there really ever a time when we call that method when we do not have a SessionFactory? My usage search shows no usages of this method passing in a Configuration (which is the other Mapping implementor aside from SessionFactory).
--
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
14 years, 5 months