You need to store this data somewhere. Either you:
* Introduce an additional association between the Customer and DiscountLevel, pointing to the lastest one. You find the previous one, but you have no order before that.
* Introduce an addition entity between Customer and DiscountLevel on which you save the createdDate of that relationship. You can then find the latest (and the one before that).