Skip to content

ElementValueChange not using @Id annotation in Levenstein #167

@tchegito

Description

@tchegito

Hi people,

not sure that's an issue, maybe an enhancement, but I'm surprised of a different behavior between simple method and Levenshtein method for comparing.

I isolate it in a very simple usecase, which I resume here with words instead of code.
Consider two class A and B with each one an @id declared on a field. Class A contains a field which is a list of object B.
We create two instances A1 and A2 of A with same value I1 for Id. We create two instances B1 and B2 of B with same value I2 for Id. We assign a singleton list of B1 to object A1. And the same for A2 with a singleton list of B2.

Now, let's compare.

Simple method returns no differences at all.
And Levenshtein returns one difference of type ElementValueChange. I check the code, and that's because of this method calls 'equals' method which I haven't defined. Okay. But why this method can't compare fields defined with @id ?

Thanks for help. And by the way, this is a great library !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions