ursus
08/14/2019, 12:23 AMgetChangePayload
)
Say I have a model, the usual case fo areItemsEqual is to use equals(), but what if I dont want to compare all the fields?
So, I could write a reflection util / codegen for this, but it requires to have some sort of a @Exclude annotation on a given field
*which in turn means that our data/domain layer Foo model knows about diff util stuff
so not sure if this is the way to go*
should it maybe be manual code and keep reflection (traversing all the fields) unit test to check if new fields are added) (edited)
-- or, create a UI layer level model from it, and use just the plain equals from it (or not, doesnt matter, since now diffutil annotations make sense)rkeazor
08/18/2019, 2:30 PM