Hi I am trying to use a dynamic proxy in a 1:n relation (loading a list) but a I can 't figure out how make it work (I get a java.lang.ClassCastException when I try to get the any object), can anyone give me a simple example of how to use a dynamic proxy.

Detail

Clases:

Product InterfaceProduct (Interface)
ProductGroup (contains List products)


XML:
<class-descriptor class="Product"  proxy="dynamic" table="PRODUCT">
..............
<class-descriptor class="ProductGroup" table="PRODUCTGROUP">
.....
.....
<collection-descriptor name="products" element-class-ref="Product">
<inverse-foreignkey field-ref="idProductGroup"/>
</collection-descriptor>

so, when y get a product Group y get a list of products filled with objects of the type (InterfaceProduct)

and I can say

InterfaceProduct  i=(InterfaceProduct)  ptoducts.get(0);
without errors

but how I can materialize the Product Object ????????


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to