I have the following scenarios for which i need to write hibernate mapping file.
My POJO has the folllowing structure,
public class Test {
public Test() {
}
private Map<String, Set<String>> variable1;
public void setVariable1(final Map<String, Set<String>> theVariable1) {
variable1 = theVariable1;
}
public Map<String, Set<String>> getVariable1() {
return variable1;
}
private Map<String, Map<String>> variable2;
public void setVariable2(final Map<String, Map<String>> theVariable2) {
variable1 = theVariable2;
}
public Map<String, Set<String>> getVariable2() {
return variable2;
}
}
This object structure is a valid one, as i can implement this object model with out using hibernate. "If something i can do with out using hibernate, i should be able to do that using hibernate too".
I hope everybody accept this statment. Now the problem is i dont know the answer to the following question,
How do i write the hibernate mapping for both these variables, variable1 and variable2 in the Test.hbm.xml file?
Please help me out ASAP.
Thanks,
Amjath Sharief
|