我想从其他 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。知道如何处理这个问题吗?