For the super extra flexible option, consider the use case explained here https://forum.hibernate.org/viewtopic.php?f=31&t=1038713&p=2483701#p2483701