[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3475) Support not-found="ignore" for <any> mappings

Felix Gnass (JIRA) noreply at atlassian.com
Wed Sep 10 14:29:04 EDT 2008


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

Felix Gnass commented on HHH-3475:
----------------------------------

A feasible (though not very elegant) solution is to use a custom Type that extends AnyType and calls session.internalLoad(entityName, id, false, true) instead of session.internalLoad(entityName, id, false, false).

I wonder if it would be a good idea to make this the default behavior of AnyType.java for the reasons stated in the issue's description above.

Comments anyone?

> Support not-found="ignore" for <any> mappings
> ---------------------------------------------
>
>                 Key: HHH-3475
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3475
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.3.0.SP1
>            Reporter: Felix Gnass
>            Priority: Minor
>
> It would be useful if the <any> element would support the not-found="ignore|exception" setting. Due to the nature of any-mappings it's impossible to use on-delete cascades at the database layer, so it's very likely that ObjectNotFoundExceptions occur. 
> Currently the only work-around to gracefully handle such situations seems to be the implementation of a custom EntityNotFoundDelegate that doesn't throw an exception.

-- 
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