MongoDB-Cannot autogenerate id of type java.lang.Long for entity of type
错误
org.springframework.dao.InvalidDataAccessApiUsageException: Cannot autogenerate id of type java.lang.Long for entity of type com.xxxx.xxxx.xxx.api.mongoentity.xxxx!at org.springframework.data.mongodb.core.EntityOperations$MappedEntity.assertUpdateableIdIfNotSet(EntityOperations.java:614) ~[spring-data-mongodb-3.2.3.jar:3.2.3]at org.springframework.data.mongodb.core.MongoTemplate.doInsertBatch(MongoTemplate.java:1335) ~[spring-data-mongodb-3.2.3.jar:3.2.3]at org.springframework.data.mongodb.core.MongoTemplate.insert(MongoTemplate.java:1280) ~[spring-data-mongodb-3.2.3.jar:3.2.3]
解决方案
参考
Spring data mongodb. Generating id’s error
https://stackoverflow.com/questions/26574409/spring-data-mongodb-generating-ids-error
MongoDB-Cannot autogenerate id of type java.lang.Long for entity of type相关推荐
- Cannot autogenerate id of type java.lang.Integer for entity of type com.mongodb.pojo.User!
第一次尝试使用MongoDB对实体进行插入操作,结果出现 Cannot autogenerate id of type java.lang.Integer for entity of type com ...
- Cannot autogenerate id of type java.lang.Integer for entity
在直接对MongoDB中插入实体对象的时候出现了 Cannot autogenerate id of type java.lang.Integer for entity org.springframe ...
- Property ‘id‘ not found on type java.lang.String问题解决
Property 'id' not found on type java.lang.String问题解决 参考文章: (1)Property 'id' not found on type java.l ...
- java myeclipse The type java.lang.CharSequence cannot be resolved. It is indirectly referen
The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class ...
- java.lang.IllegalArgumentException: Not an managed type
出现异常: java.lang.IllegalArgumentException: Not an managed type spring+jpa框架整合出现问题: 从svn checkout项目出来后 ...
- 求助--报错:Caused by: java.lang.ClassCastException: org.apache.ibatis.type.InstantTypeHandler cannot be
这里写自定义目录标题 问题描述: 问题描述: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creat ...
- 头条穿山甲GroMore广告报错Value pangle of type java.lang.String cannot be converted to JSONObject
接入头条穿山甲广告, 按官网走的, 使用时候大量报错. Value pangle of type java.lang.String cannot be converted to JSONObject ...
- 使用CGlib出现java.lang.NoClassDefFoundError: org/objectweb/asm/Type异常
使用CGlib出现java.lang.NoClassDefFoundError: org/objectweb/asm/Type异常 参考文章: (1)使用CGlib出现java.lang.NoClas ...
- Failed to convert property value of type java.lang.String to required type java.lang.Integer for pro
Failed to convert property value of type java.lang.String to required type java.lang.Integer for pro ...
最新文章
- 干货 | 大数据人工智能领域从菜鸟到高手晋级指南
- 前端MVC Vue2学习总结(四)——条件渲染、列表渲染、事件处理器
- 文秘专业计算机基础考题,《计算机应用基础》课程无纸化试题库建设及应用分析...
- 比赛,幸福度_幸福与生活满意度
- mysql的中文乱码url,MySQL 中文显示乱码
- [译] Go 并发编程基础
- Serve Django Applications with uWSGI and Nginx
- shell中lsort,uniq,cut,wc,seq命令使用
- Highcharts:小案例,自定义图片下载路径,中文乱码的解决办法(不足之处,求指点)。...
- jdbc教程_JDBC教程
- (TOJ1224)数据结构练习题——后序遍历二叉树
- RapidMiner Studio 自动模型
- linux命令键盘快捷键,如何将Linux命令设置成键盘快捷键
- xpadder教程:自定义设置游戏手柄的图片
- 【论文写作PS】两张图片合为一张,不覆盖
- Eclipse开发EJB3
- 微信小程序开发入门实例
- 2017.11.25 计算机一级,2017计算机一级MSOffice考试试题
- 论如何使用三相220V变频器驱动额定电压为380V Y接法的三相异步电机
- 建立一个新的Oracle数据库
热门文章
- 小程序wx-charts的项目实用
- Spring Cloud 第六天
- php 如何导出图片分辨率,PHP实现将上传图片自动缩放到指定分辨率,并保持清晰度封装类示例...
- 快速解决 MacOS 启动台程序删除之后图标仍存在显示问号的问题
- 小峰子:只要你还在远处看着我,就不会有别人走进我的心里,一颗心永远为你而跳动。亲爱的人,终于等到今天,我才能鼓足勇气,向你说:做我一生唯一的情人吧。
- Android进阶——网络通信之ip rule,ip route等策略路由小结
- HCIA-第二节课学习笔记总结(ARP协议与IP地址)
- 对于iMazing电脑版需要输入许可证激活编号
- 华为OD真题:学习成长记录篇:深度优先搜索算法+递归思想
- 论文阅读(3)-基于改进的U-Net的皮肤病变分割