osglworks / java-tool

Some simple common Java utilities
Apache License 2.0
52 stars 18 forks source link

DataMapping - filter failure with nested structure #208

Closed greenlaw110 closed 5 years ago

greenlaw110 commented 5 years ago

With the following bean classes:

public class Foo {
    public String name;
    public int level;
    public boolean flag;
}

public class Bar {
    public String name;
    public Foo foo;
}

Given the following bean copy with filter:

Bar source = ...;
Bar target = $.deepCopy(source).filter("-foo,+foo.name").to(Bar.class);

Expected:

Found: