Skip to content
Advertisement

Tag: equality

Compare two objects excluding some fields – Java

I need to compare two objects of the same class excluding some fields. How can i find if the two objects of the above class are equal excluding createdAt and updatedAt values? Since there are a lot of fields in this class, i don’t want to compare each of them one by one. Please don’t give AssertJ’s recursive comparison solution

Advertisement