Hi,
Is it possible to have a collection that holds objects of different types?
Of course, the types will be hibernate compliant (base types or persistent classes).
If yes, how do you declare such a collection?
Thanks
Christophe
/**
* @hibernate.class table="MyClasses"
/*
MyClass {
Map _properties;
/**
* @hibernate.map name="Properties"
* how do i declare the mapping
*/
public Map getProperties() {
return _properties;
}
public void setProperties(Map properties) {
_properties = properties
}
public void addProperty(String name, Object value) {
_properties.put(name, value);
}
....
}
|