Hi,
I am considering into utilizing hibernate in a new project I'm working on...
I have a dynamic class which is similar to a map as it can store dynamic values, however when I write it into the DB I only want to save some specific values out of it.
Code:
// for example my class
public class LikeAMap {
public void setValue(String name, String value);
public void getValue(String name);
}
public class mainClass {
LikeAMap one = new LikeAMap();
one.setValue("a","important");
one.setValue("b","doesn't need to be saved");
LikeAMap two = new LikeAMap();
two.setValue("a","need to be saved");
two.setValue("b","runtime garbage");
}
now I want to save all my LikeAMap instances into the DB using hibernate... but I only want to save the values "a", and not values "b".
Is there a way to define such an XML which only saves values of
Value property where key is "a"?
I've snooped around the documentation and couldn't find out if/how can I do this, your help will be much appriciated....
Thanks!
Shahar.