[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-3994) Dynamic Instantiation with static inner class

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Jun 29 17:02:16 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-3994.
-------------------------------

    Resolution: Rejected

Try the same via ClassLoader.loadClass()...

The correct 'naming' is select new com.foo.Foo$Bar

> Dynamic Instantiation with static inner class
> ---------------------------------------------
>
>                 Key: HHH-3994
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3994
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: query-hql
>    Affects Versions: 3.3.0.GA
>            Reporter: Adrian Shum
>            Priority: Minor
>
> Currently dynamic instantiation seems not valid for static inner class.  For example:
> package com.foo;
> public class Foo {
>   public static class Bar {
>     public Bar(int var) {....}
>   }
> }
> select new com.foo.Foo.Bar(entity.field) from MyEntity entity;
> seems not working.  Hibernate complains for unable to find com.foo.Foo.Bar
> In fact I don't see the reason for not allowing public static inner class for dynamic instantiation (or it is just a bug?)

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