我想從其他bean填充bean。填充來自其他Bean的Bean
Example:
// this is mapped to db using hibernate.
class A {
string name;
string age;
Date dateA;
B obj;
}
// this was mapped to db but now I'd like to populate it from class A member dateA;
class B{
Date date;
}
當我嘗試設置B對象時,我得到了nullpointerexception。任何想法如何處理這個問題?
你如何設置'B'對象? – Jaguar