Hey,
my problem is as follow:
I have a class A which has one "property" called
value, which should
be any type of object respectively has a reference to any kind of object!
(sorry for my english!)
It could be a a basic type(like string), any (selfdefined) object or a collection of one of these objects!
So far, i use "any type mapping" :
Code:
<any name="value" id-type="long" cascade="all">
<column name="class_name"/>
<column name="class_id" />
</any>
so i just had a reference to the "value-object"!
It works well for "any kind of object" and for the basic types (with wrapper classes)!
But what about a collection of objects ?
I could solute this, with writing a class B which has a one-to-many relationship with class C!
Class C hold the references of the "true" objects.
Class D is referenced by the
value of class A.
But it seems to be a little bit confused!
There's certainly an better way, but i'm confused of reading chapter6 & 7 again and again and test some different ways...
I would be grateful for hints..