Your dog shouldn’t hate you, unless you mistreat him. I don’t know what breed of dog you have, nor the age of the dog, but what is clear is that if your dog bites you it is because he is badly educated. A dog cannot bite its master, nor its master or anyone else, unless it is trained and attacks the order.
Dogs need to be educated and trained from an early age, at least to be sociable and educated, this is basic for them to have a mental balance. Dogs are animals of hierarchy, and they need to have an alpha male, someone who commands. If a dog sleeps in his love’s bed, if he enters first through the doors, if when he leaves the house he goes out first, if he eats before his master, if, as you say, the dog bites him, it is possible that he thinks he is in charge and that he is the alpha male.
Dogs must be taught who is in charge from an early age, and they must be educated about what is right and what is wrong, through prizes and punishments. Punishing a dog is as simple as having him sit in a certain place for a certain time, without him being able to move from there, on the contrary a prize is a trinket,