This works for POST offer, but not for PUT offer. The exception is:
org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.TransientObjectException:
object references an unsaved transient instance - save the transient instance before flushing:
org.sharesquare.hub.model.data.preferences.EntityBooleanPreference;
nested exception is java.lang.IllegalStateException
Workaround at the moment are randomly generated Preference ids by Java's UUID class. This can be found in the OfferService class.