Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Destination bean for Collection Object not working as it is working for non collection object. #188

Open
deep121 opened this issue Feb 14, 2018 · 1 comment

Comments

@deep121
Copy link

deep121 commented Feb 14, 2018

hi,
While Using updating destination bean , we pass the instance of destination bean along with Source instance.now , there are 2 scenarios which i faced , output differs in both cases:
Scenario 1: if source has field(non collection field like String name) which is null. Now if destination has this field , then this value will not be updated in destination bean.

Scenario 2: if source has field(collection field like List ids) which is null. Now if destination has this field , then this value will updated in destination bean.

I want same result as in case of non collection field. i means i will update the field in destination bean only if the field in source is not null .Is it is possible?

Thanks

@slemesle
Copy link

slemesle commented Mar 6, 2018

Hi,

Are you using the withIgnoreNullValue in both cases ? This should work the same but don't expect updating collections of objects in a destination bean.
For the moment Selma can only overrides the existing collection with the one coming from source bean.
I hope this helps. If the null value is not handled with the same behavior I'll consider this as a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants