【问题标题】:Unable to set MongoDB to autoincrement in Springboot using Hibernate无法使用 Hibernate 在 Spring Boot 中将 MongoDB 设置为自动递增
【发布时间】:2018-01-17 17:27:16
【问题描述】:

我尝试使用此链接(CustomSequences)在 Spring Boot Web 应用程序中进行自动增量:

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

但我收到此错误消息:

我做了一些研究,发现这个问题已经出现在这个网页链接上: Spring data mongodb field auto increment

如果我可以使用 Hibernate 在 MongoDB 中进行自动增量,请告诉我。

提前致谢。

【问题讨论】:

    标签: mongodb hibernate spring-boot


    【解决方案1】:

    Hibernate 不适用于 MongoDB,它仅适用于基于 SQL 的数据库。您需要使用 Spring Data MongoDB 之类的东西才能使其正常工作。

    【讨论】:

      猜你喜欢
      • 2020-08-04
      • 1970-01-01
      • 2018-03-20
      • 1970-01-01
      • 2015-04-29
      • 2017-01-11
      • 2018-07-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多