Does totalItems and totalQuantity need to be persisted? We can recalculate them each time we need, it would simplify the class.
Why were they persisted in Cart entity?