Add equals and hasCode methods on the model classes.