0

I tried to do autoincrement in Spring boot web application using this link(CustomSequences):

How can we create Auto generated field for mongodb using spring boot

but i got this error message:

enter image description here

I did some research and found that this question has already been as on this web link: Spring data mongodb field auto increment

Please let me know if i can do auto increment in MongoDB using Hibernate.

Thanks in advance.

Ravi Vyas
  • 410
  • 6
  • 12

1 Answers1

1

Hibernate doesn't work with MongoDB, it works only with SQL-based databases. You need to use something like Spring Data MongoDB in order to work to make it work.

Danylo Zatorsky
  • 5,856
  • 2
  • 25
  • 49