Skip to content

Problem with @CopyProperty(ignored=true) in n+1 object #39

@danielsawan

Description

@danielsawan

Hi @yangtu222

I think i found a bug in this simple example :

public class User {
	public String name;	
	public Job job;
	
	@CopyProperty(ignored=true)
	public List<SomeThing> things1;
}

public class Job {
	public String name;	
	
	@CopyProperty(ignored=true)
	public List<SomeClass> things2;
}
// api call
User userCopy = BeanCopyUtils.copyBean(user, User.class);

I get the userCopy.things1 = null which is exactly what i want !

The problem is that userCopy.job.things2 is not null even if annotated with @CopyProperty(ignored=true).

So i think the annotations declared in N+1 are like not "parsed".

Thanks for your help !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions