I think it should really be handled elsewhere. If the books have the same hashcode and same equality they really should be the same book.