Skip to content

Use UUID generation with JPA Hibernate for Preferences #26

@kat-ka

Description

@kat-ka

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementIf it is not a bug nor a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions