[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3537) Criteria Projections does not work on type level

Hauke Rabe (JIRA) noreply at atlassian.com
Fri Oct 17 06:43:06 EDT 2008


Criteria Projections does not work on type level
------------------------------------------------

                 Key: HHH-3537
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3537
             Project: Hibernate Core
          Issue Type: Bug
          Components: query-criteria
    Affects Versions: 3.3.1
            Reporter: Hauke Rabe


A criteria without a user specific projection adds all object  properties to the select fragment and backwards. These functionallity is missing on user specific projections. I want to declare a projection on a type level. See the projection Projections.object("aliasA") in following example:

Criteria criteriaA  = session.createCriteria("A", "aliasA");
Criteria criteriaB  = criteriaA.createCriteria("B", "aliasB")

// some criterion on A and B

ProjectionList projectionList = Projections.projectionList();
projectionList.add(Projections.object("aliasA"));
projectionList.add(Projections.max("aliasB.xxx"));

criteria.setProjection(projectionList);

In deep:
org.hibernate.loader.Loader.getRowFromResultSet(...) has the functionallity to instantiate objects from the result set if entitity persisters are set, these entity persisters are set through the org.hibernate.loader.JoinWoker.initPersisters(...) only if no user specific projection is set.


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