Using Hibernate, I get some data from my db. These datas are doubles.
All the getter & setter are using double into the next example.
crm.setEfforts(cc.getMxDocumentationMan()+cc.getMxImplementationMan()+cc.getMxProjectAnalysisMan()+cc.getMxProjectManagementMan()+cc.getMxQaMan()+cc.getMxMindDevMan());
Thing is, when I run my script, I get the following:
[java] java.lang.NullPointerException
[java] at com.mx.releasemgr.change.ViewChangeReportAction.getChangeReport(ViewChangeReportAction.java:327)
And line 327 is this one, obviously...
crm.setEfforts(cc.getMxDocumentationMan()+cc.getMxImplementationMan()+cc.getMxProjectAnalysisMan()+cc.getMxProjectManagementMan()+cc.getMxQaMan()+cc.getMxMindDevMan());
And I can't check if the double are null since
it is not possible in java since double
shouldnt be null but 0....
How can i fix that ? Changing my hibernate xml mapping file to specify that theses fields are double in the "type" tag ?