ClassCastException cannot dissolve proxy (OR Hibernate)

H

horst

Hey !

I have a class struture: Abstact Superclass, and two SubClasses.
The two sublasses are mapped in one DB-Table.
Sometimes got a ClassCastExeception because the object is an dissolve
proxy-object from type superclass. And I can't cast from the
superclass to a subclass ;-)
When I try to dissolve the proxy-object manual with aObject.getUid()
(or so), it doesn't dissolve to the correcty subclass too.

But sometimes it absolutly correct.

When I change in my hibernate-file the object from lazy=true in lazy =
false it still works correctly.
But I have at an other place the same object-struture and the same
definition lazy=true, and it still works.

Do you know about any problems and a solution?

Horst
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top