[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2965) When using Criteria.setResultTransformer(CriteriaSpecification.ALIAS_TO_ENTITY_MAP) method aliases need to be optional

jasonyuan (JIRA) noreply at atlassian.com
Tue Feb 14 23:39:10 EST 2012


    [ https://hibernate.onjira.com/browse/HHH-2965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45519#comment-45519 ] 

jasonyuan commented on HHH-2965:
--------------------------------

Specification and law is not to say,it need to written and forbidden from structure, thanks.

> When using Criteria.setResultTransformer(CriteriaSpecification.ALIAS_TO_ENTITY_MAP) method aliases need to be optional
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-2965
>                 URL: https://hibernate.onjira.com/browse/HHH-2965
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.2
>         Environment: 3.2.2 Oracle 10G
>            Reporter: Ittai Zeidman
>            Priority: Critical
>
> now when using the CriteriaSpecification- ALIAS_TO_ENTITY_MAP the convertion to map is using the aliases array, if it does not find an alias for the property it is not included in the map. I think that if no alias is defined then the propertyName attribute needs to be assigned as the key for the value in the hashmap.
> I came across this issue as i have many mapped entities in my system and when using projections i need to use the resultTransformer. this is critical as when using aliases it is duplicated not only to the select clause but to the where clause only which is another open bug (#HB-1331). If one bug is closed then the other can be considered as minor as i can give aliases to every property i need if it does not affect my where clause.

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