[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-37) Nested instantiation using "select new"

Terry Bhatti (JIRA) noreply at atlassian.com
Tue Dec 9 01:13:15 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31901#action_31901 ] 

Terry Bhatti commented on HHH-37:
---------------------------------

This is sitting open since 2004, wish it had been done since.

> Nested instantiation using "select new"
> ---------------------------------------
>
>                 Key: HHH-37
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-37
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 3.0 alpha
>         Environment: Hibernate 3.0 alpha
>            Reporter: Regis Pires Magalhaes
>            Assignee: Steve Ebersole
>         Attachments: h3.0.1_grammar.patch, h3.0.1_src.patch, h3.0.1_src_b.patch, IteratorImpl.java, Loader.java, NestedHolderClass.java, QueryTranslatorImpl.java, ScrollableResultsImpl.java, SelectParser.java
>
>
> Our suggestion is to get lightweight objects from Hibernate using nested new's in HQL "select new" feature.
> Currently, the following HQL statement works fine:
> select new Store(store.id, store.description) from Store store
> However we can not do a nested instantiation like:
> select new Store(store.id, store.description, new Section(store.section.id, store.section.name)) from Store store
> We have done some custom changes in our Hibernate 3.0 alpha source code in order to support it.
> The changed classes were:
> org.hibernate.impl.IteratorImpl
> org.hibernate.loader.Loader
> org.hibernate.hql.QueryTranslatorImpl
> org.hibernate.impl.ScrollableResultsImpl
> org.hibernate.hql.SelectParser
> The new class is:
> org.hibernate.util.NestedHolderClass;
> We would like to know if Hibernate Team has some interest to analyse this contribution and maybe add this feature to future versions of Hibernate.

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