[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5048) @Type ignored by envers?, whole transaction rollbacked, but applcation continues, without warning

Adam Warski (JIRA) noreply at atlassian.com
Tue Apr 6 16:45:02 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=36190#action_36190 ] 

Adam Warski commented on HHH-5048:
----------------------------------

The hibernate manual (http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#mapping-types-custom) says that any user types should implement CustomType or CompositeCustomType.

Also, the problem with the exception not being thrown to the client is fixed in trunk.

> @Type ignored by envers?,whole transaction rollbacked, but applcation continues, without warning
> ------------------------------------------------------------------------------------------------
>
>                 Key: HHH-5048
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5048
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: envers
>            Reporter: Donovan
>            Priority: Blocker
>         Attachments: EuroTypeTest_for_envers.patch
>
>
> Following problem occurs when i audited my entity with a custom type:
> Testcase included, as a svn-patch on the current envers - trunk.
> Envers does not use my @Type to save the revision, because it is not a org.hibernate.usertype.UserType, but a extension of org.hibernate.type.DoubleType. 
> This give me a readable exception, i can live with that, but still a bug. Implementing my EuroType as a org.hibernate.usertype.UserType resolves my immediate problem.
> The worst is that a exception is thrown, transaction is rollbacked, but the exception does not reach my application. 
> As in the testcase, the problem is detected(too late) by query on the entity and you get NULL;
> Thats why i gave it the prio blocker.
> Adding @NotAudited on "Euro component" gives you a green test, Envers SHOULD NOT influent this, or at least throw a exception, so i get notified that my entity is not saved or created.

-- 
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list