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

Adrian Shum (JIRA) noreply at atlassian.com
Fri Jun 26 03:46:34 EDT 2009


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