[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6766) Support Multicolumn Subqueries in Criteria API

Lukasz Antoniak (JIRA) noreply at atlassian.com
Mon Oct 24 15:33:19 EDT 2011


Support Multicolumn Subqueries in Criteria API
----------------------------------------------

                 Key: HHH-6766
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6766
             Project: Hibernate Core
          Issue Type: Improvement
          Components: query-criteria
            Reporter: Lukasz Antoniak
            Assignee: Lukasz Antoniak


Support queries like:
{code:sql}
SELECT *
  FROM entity1 e1
 WHERE (e1.attr1, e1.attr2) = ( SELECT e2.attr1
                                     , e2.attr2
                                  FROM entity2 e2
                                 WHERE e2.attr3 = ?
                              );
{code}

HQL supports such expressions:
{code:java}
session.createQuery( "select w from Woman w where (w.height, w.weight) = (select m.height, m.weight from Man m where m.name = 'Lukasz' )" ).list();
{code}

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