mnimer / dphibernate

Automatically exported from code.google.com/p/dphibernate
0 stars 0 forks source link

Long identity types #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Use a java.lang.Long identity type for an entity class.
2.  The entity class should extend the HibernateProxy class
3.  override getProxyKey().  Have it return the identity.

What is the expected output? What do you see instead?
The expected result is normal behavior, the same as if the identity were an 
Integer.  Instead I see ClassCastException cannot cast java.lang.Integer to 
java.lang.Long.

What version of the product are you using? On what operating system?
Version 2.0 RC3.

Please provide any additional information below.

When using java.lang.Long types as Identities for domain (Entity)
objects, I'm getting ClassCastExceptions.  An Integer appears to be
passed instead of Long.

As I was monitoring the Blaze Amf3Input class, I observed that when a
ProxyLoadRequest comes in from the HibernateRemoteObject, the proxyID
property is returned as type 4 (same as Integer).  Subsequently, the
proxyID is used to load the proxy, but since the type is Integer
instead of Long, a ClassCastException is thrown.

Original issue reported on code.google.com by dae...@gmail.com on 26 Jan 2011 at 12:55

GoogleCodeExporter commented 9 years ago
Committed patch provided by Dae Kim, should resolve issue.

Original comment by martypit...@gtempaccount.com on 1 Feb 2011 at 12:36