Okay, so I have torn what I had down and am rebuilding it, here's what I need to do.
I have an entity called Property with:
String name;
@ManyToOne EntityType type;
??????? value
I need to store a Value too, but depending on the Type, the value could be either a String, a Double, or a link to another object (of Class type.getJavaClass()).
I tried to do this with inheritance all sorts of ways but still need to be able to do new Property() and have it set the value to null until a Type gets selected, when the appropriate kind of Type gets selected.
What would be the prettiest would be to have the Value be type Object (that way I could put either a String, Double or type.getJavaClass() there, but hibernate won't let me do it. :(
Any ideas or recommendations on a good way to accomplish this would be appreciated! Thanks, Joshua