Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Issues List »

[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3369) Let the
proxy extends the most possible lower class in a class heirarchy

Anupam M (JIRA)

2008-07-01


Author LoginPost Reply
Let the proxy extends the most possible lower class in a class heirarchy
------------------------------------------------------------------------

          Key: HHH-3369
          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3369
        Project: Hibernate3
      Issue Type: New Feature
      Components: core
  Affects Versions: 3.3.0.CR1
       Reporter: Amr Noaman


This feature may resolve the famous ClassCastException that appear with all those who worked with proxies and type heirarchies.

If you have a type hierarchy like this:

  A
  /  \
B   C

The following statement will return a proxy that extends A:

session.Load(typeof(A), Id);

The load operation blindly creates a proxy that extends A, even if the real object is of type B or C, and this makes casting to B or C not possible.

Instead, It may check the discriminator value, and accordingly, it may let the proxy extend the proper actual type. So, if the discriminator says that this record is of type B, the proxy should extend type B instead of A, and so on.

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

   
_______________________________________________
hibernate-issues mailing list
hibernate-issues@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-issues
©2008 gg3721.com - Jax Systems, LLC, U.S.A.