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

Having wildcard=true I cannot map via annotations #737

Open
alexey-anufriev opened this issue Jan 18, 2019 · 4 comments
Open

Having wildcard=true I cannot map via annotations #737

alexey-anufriev opened this issue Jan 18, 2019 · 4 comments
Assignees

Comments

@alexey-anufriev
Copy link

Whats your runtime?

  • Dozer version: 6.4.1
  • OS version: MacOS Mojave
  • JDK version: 8

Whats the problem?

Steps to reproduce:

  1. Set <wildcard>false</wildcard> in configuration
  2. Create Source and Target classes with two fields: fieldA and fieldB and corresponding getters and setters
  3. Annotate only fieldA in those classes but keep fieldB
  4. Do not supply any XML mappings, use only annotations
  5. Try to map

Observed Results:

In Target object neither fieldA nor fieldB has values

Expected Results:

Only annotated fieldA is being mapped

Reason:

Inside ClassMapBuilder#generateMapping there is a condition:

if (!classMap.isWildcard()) {
    return;
}
@alexey-anufriev
Copy link
Author

alexey-anufriev commented Jan 18, 2019

Using XML mapping that works but not via annotations. Documentations says that with wildcard being disabled it is important to specify fields explicitly. But isn't that so if I have annotations?

@alexey-anufriev
Copy link
Author

hi @garethahealy, is there a reason for this to be closed?

@garethahealy
Copy link
Collaborator

@alexey-anufriev ; i currently don't have the time to investigate/fix, if you've like to raise a PR, happy to look at that.

@alexey-anufriev
Copy link
Author

@garethahealy, sure, can you reopen this issue and assign to me?

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

No branches or pull requests

2 participants