I know that dative comes first (besides when there is a personal pronoun which is in the accusative) but -
Er hat einen Termin mit dir sounds better to my ears.
Which is right? or both work? If the latter works, how come the accusative comes before the dative object (which in this case is also a personal pronoun)?