[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1614) parent element should accept access="field"

Hontvári József (JIRA) noreply at atlassian.com
Wed Mar 28 05:09:06 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_26575 ] 

Hontvári József commented on HHH-1614:
--------------------------------------

Now I debugged the code in 3.2.2. and also checked if trunk is the same (yes).
The parent field is hadled separately from other properties in the component. 

PojoComponentTuplizer constructor calls PropertyAccessorFactory.getPropertyAccessor( null ). Note the null parameter, which should be the type of access (i.e. field; getter/setter; etc.). This method (which has a comment: "todo : this eventually needs to be removed"), considers null as if "property" were supplied and returns a BASIC_PROPERTY_ACCESSOR, which according to its document only uses getters/setters. I guess, for field access, instead of null the value "field" should be passed, so it would return a DIRECT_PROPERTY_ACCESSOR

> parent element should accept access="field"
> -------------------------------------------
>
>                 Key: HHH-1614
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1614
>             Project: Hibernate3
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.0.5
>            Reporter: Hontvári József
>            Priority: Minor
>
> Currently one cannot specify access="field" in a Hibernate mapping file in the "parent" element of components. This means that JavaBean style setters and getters must be created even if all other fields are accessed directly by Hibernate, which doesn't look nice in the source.

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