Hibernate version:
Hibernate 3.1 alpha 1
Annotations 3.1 beta 3
Hello, I have tried using java generics with annotations together, but Hibernate is replacing the collections like
Set<MyClass> mySet;
with its own PersistentSet. When ut as I would like to do something with reflection later using
myClass.getMySet().getClass().getTypeParameters();
basicaly I would like to get the Type Parameter ("MyClass") on runtime. It looks like it is not possible to get this information. Does anyone have any idea. I have been trying to find something like getOriginalDeclaredClass() method in class org.hibernate.collection.AbstractPersistentCollection, but I have not found such method. Or maybe there is a plan to make PersistentSet using generics too so I would get something like PersistentSet<MyClass> but if PersistentSet is never used before compilation it seems quite unnecessary to put generics at this point.
|