I would like to define an entity which contains a list of something (for example embeddable) and each of these embeddables have a property active. At once, only one element inside the list is allowed to be active.
How does one implement this in Hibernate?