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

Out parameter generated as method #109

Closed
millencolin99 opened this issue Aug 8, 2016 · 4 comments
Closed

Out parameter generated as method #109

millencolin99 opened this issue Aug 8, 2016 · 4 comments
Labels
Milestone

Comments

@millencolin99
Copy link

I have the following mapper:

@Mapper(withCustom = StoreVisitRawDataCustomMapper.class, withIgnoreMissing = IgnoreMissing.ALL)
public interface StoreVisitRawDataMapper
{
    StoreAddedToCartProduct toAddedToCartProduct(StoreVisitRawData storeVisitRawData);
    StoreAddedToCartProduct toAddedToCartProduct(Customer customer, StoreAddedToCartProduct storeAddedToCartProduct);
}

Bizarrely for the second method Selma generates this:

@Override
  public final com.storakle.databaseinterfaces.models.StoreAddedToCartProduct toAddedToCartProduct(com.storakle.databaseinterfaces.models.Customer in, com.storakle.databaseinterfaces.models.StoreAddedToCartProduct out) {
    if (in != null) {
      out = customMapperStoreVisitRawDataCustomMapper.toAddedToCartProduct(in, out());
    } else {
      out = null;
    }
    return out;
  }

Notice the out parameter is passed in as out(), which generates a compile error.

Am I doing something wrong or this is a bug?

@millencolin99
Copy link
Author

Anyone care to comment on this?

@slemesle
Copy link

Hi, this looks like a bug yes.
Can you provide the StoreVisitRawDataCustomMapper class.
I am sorry but I am on holidays for now and have no time to fix this.
I'll give it a look later.

@slemesle
Copy link

Hi, I really need a complete code sample to analyse this.

@slemesle slemesle added the bug label Sep 20, 2016
@slemesle slemesle added this to the 1.0 Final milestone Sep 20, 2016
@slemesle
Copy link

Fixed in master branch

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

No branches or pull requests

2 participants