[hibernate-issues] [Hibernate-JIRA] Commented: (HV-542) HibernateTraversableResolver does not correctly determine if an lazy property is initialized.

Hardy Ferentschik (JIRA) noreply at atlassian.com
Mon Jan 30 12:42:10 EST 2012


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45305#comment-45305 ] 

Hardy Ferentschik commented on HV-542:
--------------------------------------

AFAICS, the code looks like this:

{code}
return Hibernate.isInitialized( traversableObject ) && Hibernate.isPropertyInitialized( traversableObject, traversableProperty.getName() );
{code}

What do you suggest or what is your failing usecase?

> HibernateTraversableResolver does not correctly determine if an lazy property is initialized.
> ---------------------------------------------------------------------------------------------
>
>                 Key: HV-542
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-542
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 4.1.0.Final
>         Environment: HV4.1F, HC3.6.7F, JPA2
>            Reporter: Tim Heys
>
> HibernateTraversableResolver is returning true in "isReachable" for lazy loaded properties that are not initliazed.
> Line 115:
> {code}
> Hibernate.isPropertyInitialized( traversableObject, traversableProperty.getName() );
> {code}
> only checks "traversableObject" is a Direct reference to the Entity and not a proxy, and _Hibernate.isPropertyInitialized_ is only checking if it is an instance of HibernateProxy or "instrumented" to determine if it is initialized or not.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list