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

How to map multiple beans? #100

smiklosovic opened this issue Jul 13, 2016 · 3 comments

How to map multiple beans? #100

smiklosovic opened this issue Jul 13, 2016 · 3 comments


Copy link


I have two classes and one dto. I want to map both classes to that dto. How to do that? I know how to map one class to dto but I need to do kind of "aggregation" of classes into one dto object. Is that possible?

Copy link


This is not supported by Selma for now. But you can define one mapping method per class to map on the targetted DTO.

We can for sure implement this kind of aggregation, but that won't be available soon.

Copy link

i first did mapping from the first source to the destination and after that second source updates the destination. With setting ignore missing flag to ALL because it would tell that source does not have target fields otherwise.

Copy link

CityIntense commented May 15, 2017

I have a class FooIn and an id that want to map to a class Out.

public class Out {

private FooOut foo;

private Long id;


I'd like to use a mapper as :

Out asOut(FooIn foo, Long id);

Doing so, I get this error :
setter for field id from destination bean Out has no getter in one of source beans !
I can use a class to wrap my id to make my mapper work, but it would be great if I could only use the Long id.

slemesle added a commit that referenced this issue Jun 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants