Closed GoogleCodeExporter closed 9 years ago
Can you please show me what kind of code you want to be generated, just to
understand your needs ?
Original comment by elaat...@gmail.com
on 18 Aug 2012 at 11:16
Hi
the expecting generated code can be like this
And if the generated code be
if (source.getAreaId() != null) { // this is what I am expecting.
if (((com.best.oasis.genidc.biz.base.model.BasCantonInfo) destination
.getArea()) == null)
destination
.setArea((com.best.oasis.genidc.biz.base.model.BasCantonInfo) mapperFacade
.newObject(source, usedTypes[0], mappingContext));
((com.best.oasis.genidc.biz.base.model.BasCantonInfo) destination
.getArea()).setId(((java.lang.Long) source.getAreaId()));
} // this is what I am expecting.
Original comment by wangbt5...@gmail.com
on 20 Aug 2012 at 10:10
Please at this Unit test attached to the comment, if it fit your needs.
PS: I have a fix wich do not create a new object if all properties are null and
set destination to null,
still the case when you have a primitive property and all others are null then
orika will will create new object
Original comment by elaat...@gmail.com
on 21 Aug 2012 at 8:06
Attachments:
Hi Sadi
This fits my requirment. Thanks a lot. May I know which release this changes
will be in?
Original comment by wangbt5...@gmail.com
on 22 Aug 2012 at 7:31
I will try to make a release by the end of the week,
I want to bundle some other fixes :)
Please stay tuned, one more time thank you!
Original comment by elaat...@gmail.com
on 22 Aug 2012 at 7:36
Original comment by elaat...@gmail.com
on 22 Aug 2012 at 8:52
Original comment by elaat...@gmail.com
on 22 Aug 2012 at 8:52
applied same fix and test case to 1.2.0 branch
Original comment by matt.deb...@gmail.com
on 23 Aug 2012 at 5:22
Original issue reported on code.google.com by
wangbt5...@gmail.com
on 17 Aug 2012 at 12:28