

While deriving the expresson for phase velocity in context of de broglie waves, in arthur beiser, book he has equated the quantum expresson $hv$ with relativistic formula, but this is not correct . While the first one is only for photon ( having rest mass zero).
The same has been done in Berkeley quantum physics, and they are saying its assumption. So is this assumption true? Why all the books written same thing? Why can't we do without this absurd assumption? Am I getting wrong somewhere?
1 st pic - beiser 2 - Berkeley