The children of sinful parents are not punished for the wrongdoings of their mothers and fathers, but the sins of any generation have consequences that last for generations (see 2 Samuel 12:10).
Here, the word hate does not mean having bitter or hostile feelings. Instead, it means to turn away from or abandon a relationship.