Re: Spring Data JPA cannot save entity into MySQL doc store- error: ids for this class must be manually assigned before calling save()
Posted by: Alexander Soklakov
Date: November 16, 2016 03:32AM

Hi Shahza,

You need to add a @GeneratedValue annotation for @Id column, otherwise the default GenerationType.ASSIGNED is used which requires the value to be set manually.

Please check Hibernate documentation for the proper GenerationType in case of generated column is used as an id, I'm not sure that would work without a special generator.

Additionally, if you're planning to use this table as a MySQL Document Store collection, please note that it doesn't conform the required structure. X Plugin requires the special "_id" name both for id column and in JSON document.

Thanks,
Alex

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Spring Data JPA cannot save entity into MySQL doc store- error: ids for this class must be manually assigned before calling save()
2038
November 16, 2016 03:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.