Skip to content

How to get diff of child Object ? #215

Open
@luongbaotin7777

Description

@luongbaotin7777

Hi bro !, I'm a newbie with java-object-diff. This library is amazing. But when I new object includes a child object, it cannot get diff.
Ex:
TestChild testChild1 = new TestChild();
testChild1.setId(1);
testChild1.setName("testchild1");

    TestChild testChild2 = new TestChild();
    testChild2.setId(2);
    testChild2.setName("testchild2");

    Test test1 = new Test();
    test1.setId(3);
    test1.setColumnName("test1");
    test1.setTestChild(testChild1);

    Test test2 = new Test();
    test2.setId(4);
    test2.setColumnName("test2");
    test2.setTestChild(testChild2);

when I compare the above object, I receive the result: id: 1->2, name:testchild1 -> testchild2, columnName: test1->test2
where id: 3->4 ( of Test object).

And I cannot know which field is changed by child object, which field is changed by the parent object.

Please help me
thank you very much

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