ArangoDB安装见 https://blog.csdn.net/w690333243/article/details/83626273
Springboot使用2.1.0
moven项目中 pom.xml中添加如下配置

<dependency><groupId>com.arangodb</groupId><artifactId>arangodb-spring-boot-starter</artifactId><version>1.0.0</version></dependency>

官方demo spring-data-demo:https://github.com/arangodb/spring-data-demo

Couldn’t find PersistentEntity for type class java.lang.Long!
问题原因:
AccountInfo.java 中定义 Long account;
查询获取最大account.
错误写法

@Query("FOR c IN t_accountinfo COLLECT AGGREGATE maxAccount = MAX(c.account) RETURN {maxAccount}")Long getLatestAccount();

正确写法

@Query("FOR c IN t_accountinfo COLLECT AGGREGATE maxAccount = MAX(c.account) RETURN maxAccount")Long getLatestAccount();

问题所在:
return {maxAccount}返回的是一个json对象,并不是long对象
return maxAccount 返回的是long对象

userinfo,shuoshuo 两个表联合查询:查询表中所有的项,即 a.account,a.name,b.conteng,b.time

  FOR shuoshuo IN t_shuoshuoFOR userinfo IN t_userinfo FILTER shuoshuo.account == userinfo.accountRETURN MERGE(shuoshuo, userinfo)

二、查询说说中所有项,userinfo中两项

FOR shuoshuo IN t_shuoshuo RETURN   { shuoshuo: shuoshuo, userinfo: (FOR userinfo IN t_userinfoFILTER userinfo.account == shuoshuo.accountRETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname})}

排序查询说说

FOR shuoshuo IN t_shuoshuo  SORT shuoshuo._key DESC RETURN   {shuoshuo: shuoshuo,userinfo: (FOR userinfo IN t_userinfoFILTER userinfo.account == shuoshuo.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline})}

通过id查询 说说

FOR shuoshuo IN t_shuoshuo FILTER  shuoshuo._key ==  @idRETURN   {shuoshuo: shuoshuo,userinfo: (FOR userinfo IN t_userinfoFILTER userinfo.account == shuoshuo.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline})}

查询说说,说说点赞,说说发表人信息

FOR shuoshuocomment IN t_shuoshuocomment FILTER  shuoshuocomment.shuoshuoId == "868629"  SORT shuoshuocomment._key DESC RETURN   {shuoShuoComment: shuoshuocomment,shuoShuoCommentReplyList: (FOR shuoshuocommentreply IN t_shuoshuocommentreply FILTER shuoshuocommentreply.rootCommentId == shuoshuocomment._key RETURN {shuoShuoCommentReply:shuoshuocommentreply,replyUserInfo: ( FOR userinfo IN t_userinfo FILTER userinfo.account == shuoshuocommentreply.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline} )}),commentUserInfo: ( FOR userinfo IN t_userinfo FILTER userinfo.account == shuoshuocomment.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline} )}

回复 评论计数统计

FOR shuoshuocomment IN t_shuoshuocomment FILTER  shuoshuocomment.shuoshuoId == "868629"  SORT shuoshuocomment._key DESC RETURN   {shuoShuoComment: shuoshuocomment,shuoShuoCommentReplyList: (FOR shuoshuocommentreply IN t_shuoshuocommentreply FILTER shuoshuocommentreply.rootCommentId == shuoshuocomment._key RETURN {shuoShuoCommentReply:shuoshuocommentreply,replyUserInfo: ( FOR userinfo IN t_userinfo FILTER userinfo.account == shuoshuocommentreply.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline} )}),commentUserInfo: ( FOR userinfo IN t_userinfo FILTER userinfo.account == shuoshuocomment.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline} ),commentnumber: (FOR shuocomment IN t_shuoshuocommentFILTER shuocomment.shuoshuoId == "868629"COLLECT  WITH COUNT INTO commentnumber RETURN commentnumber) ,
replynumber: (FOR shuoreply IN t_shuoshuocommentreplyFILTER shuoreply.shuoshuoId == "868629"COLLECT  WITH COUNT INTO replynumber RETURN replynumber) }
FOR shuoshuocomment IN t_shuoshuocomment FILTER  shuoshuocomment.shuoshuoId == "868629"  SORT shuoshuocomment._key DESC RETURN   {shuoShuoComment: shuoshuocomment,shuoShuoCommentReplyList: (FOR shuoshuocommentreply IN t_shuoshuocommentreply FILTER shuoshuocommentreply.rootCommentId == shuoshuocomment._key RETURN {shuoShuoCommentReply:shuoshuocommentreply,replyUserInfo: ( FOR userinfo IN t_userinfo FILTER userinfo.account == shuoshuocommentreply.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline} )}),commentUserInfo: ( FOR userinfo IN t_userinfo FILTER userinfo.account == shuoshuocomment.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline} ),commentnumber: (FOR shuocomment IN t_shuoshuocommentFILTER shuocomment.shuoshuoId == "868629"COLLECT  WITH COUNT INTO commentnumber RETURN commentnumber) ,
replynumber: (FOR shuoreply IN t_shuoshuocommentreplyFILTER shuoreply.shuoshuoId == "868629"COLLECT  WITH COUNT INTO replynumber RETURN replynumber) }

评论回复点赞,点赞计数

FOR shuoshuocomment IN t_shuoshuocomment FILTER  shuoshuocomment.shuoshuoId == "2554321"  SORT shuoshuocomment.date DESC RETURN   {shuoShuoComment: shuoshuocomment, shuoShuoCommentReplyList: (FOR shuoshuocommentreply IN t_shuoshuocommentreply FILTER shuoshuocommentreply.rootCommentId == shuoshuocomment._key RETURN {shuoShuoCommentReply:shuoshuocommentreply,
likenumber: (FOR shuocommentreplylike IN t_shuoshuocommentlikeFILTER shuocommentreplylike.commentId ==  shuoshuocommentreply._keyCOLLECT  WITH COUNT INTO likenumber RETURN likenumber), ismyliked: (FOR shuocommentreplylike IN t_shuoshuocommentlikeFILTER shuocommentreplylike.commentId == shuoshuocommentreply._key AND shuocommentreplylike.account =="10004"COLLECT  WITH COUNT INTO ismyliked RETURN ismyliked) ,replyUserInfo: ( FOR userinfo IN t_userinfo FILTER userinfo.account == shuoshuocommentreply.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline} )}),commentUserInfo: ( FOR userinfo IN t_userinfo FILTER userinfo.account == shuoshuocomment.account RETURN {avatarurl:userinfo.avatarurl,nickname:userinfo.nickname,isonline:userinfo.isonline} ),likenumber: (FOR shuocommentlike IN t_shuoshuocommentlikeFILTER shuocommentlike.commentId ==  shuoshuocomment._keyCOLLECT  WITH COUNT INTO likenumber RETURN likenumber), ismyliked: (FOR shuocommentlike IN t_shuoshuocommentlikeFILTER shuocommentlike.commentId == shuoshuocomment._key AND shuocommentlike.account == "10004"COLLECT  WITH COUNT INTO ismyliked RETURN ismyliked) }

更新于2018年12月4日 23:49
https://www.arangodb.com/arangodb-training-center/search/

更新于2018年11月18日
https://docs.arangodb.com/devel/AQL/Operations/Collect.html
https://www.arangodb.com/tutorials/mongodb-to-arangodb-tutorial/
https://www.arangodb.com/arangodb-training-center/search/
https://www.arangodb.com/documentation/
https://www.arangodb.com/why-arangodb/arangodb-vs-neo4j/
https://www.arangodb.com/arangodb-training-center/tutorials-aql-query-profiling/

https://blog.csdn.net/l1028386804/article/details/72801492 nginx+keepalived搭建高可用负载均衡
https://blog.csdn.net/qq_34021712/article/details/73441168 nginx+keepalived搭建高可用负载均衡
https://www.daimafans.com/article/d4807910888570880-p1-o1.html ArangoDB 入门指南:查询数据库
https://blog.csdn.net/yuzongtao/article/details/75968752?utm_source=blogxgwz2 ArangoDB高级操作
https://blog.csdn.net/tuntunwang/article/details/78893712 推荐系统实践—第六章:利用社交网络数据
https://cloud.tencent.com/developer/ask/65232/answer/111071
更新于2018年12月09日 0:10 周日凌晨
周四晚上,工作发生变动,记住,努力,就是为了有一天,无论发生任何事,都可以无所畏惧
更新于2019年5月2日 星期四 17:21 五一放假的第二天,来公司处理问题 sdy

https://www.cnblogs.com/litufu/articles/9650884.html ArangoDB 学习笔记 (2)数据模型
https://www.cnblogs.com/litufu/articles/9645300.html ArangoDB 学习笔记(1)入门篇
https://www.cnblogs.com/litufu/articles/9651068.html ArangoDB 学习笔记 (3)命名规范
https://www.arangodb.com/tutorials/cn-tutorial-sync-java-driver/

今天遇到一个问题,插入数据时总是报冲突:

arangodb  idx_  over conflict

之前这样写的实体类:

@Document("t_user")
@HashIndex(fields = { "account" }, unique = true)
public class AccountInfo implements Serializable {

后来改成了这样的(改之前已经有t_user表了,表信息的索引已经生成了,改后没有删除原来的数据表,导致有问题,删除表,从新生成表解决问题)

@Document("t_user")
@HashIndex(fields = { "userId" }, unique = true)
@HashIndex(fields = { "telephone" }, unique = true)
public class AccountInfo implements Serializable {

情景:刚开始设置了account为索引,并且是唯一索引。后来改掉了account为userId,但是改后数据表还在,改后插入数据时一直报索引冲突,over之类的,后来删除表,重新生成表,就没问题了
https://blog.csdn.net/zaishijizhidian/article/details/91969864
更新于2020年11月22日22:04 ylxy3eefzt

ArangoDB高级教程——ArangoDB3.3.19整合Springboot2.1.0相关推荐

  1. 千锋Java高级教程+分布式+springcloud+微信支付课程

    课程目录: ├─千锋Java高级教程-cas单点登录(完结-8集) │ 01单点登录介绍 │ 02cas介绍 │ 03tomcat搭建https │ 04cas server搭建 │ 05Cas 配置 ...

  2. springboot高级篇及springboot1.5转springboot2.17所遇到的坑

    SpringBoot的高级教程 一.SpringBoot缓存 缓存的场景 临时性数据存储[校验码] 避免频繁因为相同的内容查询数据库[查询的信息] 1.JSR107缓存规范 用的比较少 Java Ca ...

  3. [转帖]tar高级教程:增量备份、定时备份、网络备份

    tar高级教程:增量备份.定时备份.网络备份 作者: lesca 分类: Tutorials, Ubuntu 发布时间: 2012-03-01 11:42 ė浏览 27,065 次 61条评论 一.概 ...

  4. php mysql5.7.110安装教程_MYSQL教程mysql5.7.19 winx64安装配置方法图文教程(win10)

    <MYSQL教程mysql5.7.19 winx64安装配置方法图文教程(win10)>要点: 本文介绍了MYSQL教程mysql5.7.19 winx64安装配置方法图文教程(win10 ...

  5. SpringBoot的高级教程

    SpringBoot的高级教程 一.SpringBoot缓存 缓存的场景 临时性数据存储[校验码] 避免频繁因为相同的内容查询数据库[查询的信息] 1.JSR107缓存规范 用的比较少 Java Ca ...

  6. CMD命令行高级教程精选合编合集 转

    CMD命令行高级教程精选合编合集 PKjason 发布于 2013/04/14 18:24 CMD命令行高级教程精选合编,需要的朋友可以参考下. 目录 第一章 批处理基础 第一节 常用批处理内部命令简 ...

  7. C语言高级教程-C语言数组(三)

    C语言高级教程之数组教程 本文的编译环境 一.前文:C语言数组(一.二)的链接 1.1.C语言数组一文章链接 1.2.C语言数组二文章链接 二.数组的初始化 2.1.数组的初始化的几种方式 三.数组和 ...

  8. WITNESS高级教程

    WITNESS高级教程 摘自:www.iescm.com/simubook (1)常用随机输入模型及随机函数part1 part2 part3 (2)仿真输入模型的构建part1 part2 part ...

  9. 速取,3D建模速成入门到高级教程(附软件安装包)

    同名公号回复"入门资料"获取3D建模速成入门到高级教程 大家好,我是华维导师,从事游戏建模师已有10年,曾参与过腾讯<漫威>,<魂斗罗>.网易<阴阳师 ...

最新文章

  1. Artistic Style在windows下的使用(C/C++)
  2. TiXml使用详解(转)
  3. HBase学习总结(2):HBase介绍及其基本操作
  4. LTRIM、RTRIM和TRIM在ORACLE中的用法:
  5. 2021ICPC(澳门) - LCS Spanning Tree(广义后缀自动机)
  6. 面向.NET开发人员的Dapr——俯瞰Dapr
  7. C语言结构体描述BMP的文件格式
  8. Java-Runoob-高级教程-实例-数组:10. Java 实例 – 查找数组中的重复元素-un
  9. 微信回应朋友圈表情包评论关闭:灰度测试;Twitter漏洞波及1700万用户;Ruby 2.7.0发布 | 极客头条...
  10. pyecharts制作中国疫情地图
  11. Qt样式表Qss(什么是QSS;基本语法;setStyleSheet函数;样式表的属性值;利用QtCreate实现样式切换;样式表实现皮肤改变实例)
  12. Maven超级详细安装教程ovo
  13. java entry的用法_Java ZipEntry setComment()用法及代码示例
  14. [TF进阶] 循环神经网络
  15. 固态硬盘安装window系统的一些注意事项
  16. 网站建设多少钱(做一个网站需要多少钱)
  17. 大学计算机基础实验指导word,大学计算机基础实验指导全套.doc
  18. HttpClient 同时支持发送http及htpps请求
  19. 虚拟局域网软件开源_用于云和虚拟化的事实上的标准开源软件包括Linux
  20. 批量正则化Batch Normalization

热门文章

  1. 算法导论第七章习题答案(第三版) Introduction to Algorithm
  2. Apple Swift
  3. nvidia-smi no devices were found
  4. 大数据知识面试题-通用(2022版)
  5. Linux-ifcfg-eth0配置介绍
  6. codevs-1222
  7. Android-如何预置APK使得用户可以卸载,并且恢复出厂设置时能够恢复?
  8. Infa连接数据源“指定的 DSN 中,驱动程序和应用程序之间的体系结构不匹配”
  9. 计算机硬件老化对软件运行的影响,电脑用久了会卡并不一定是系统原因,还有可能是因为这几个方面...
  10. 搜狐2012 9 15校园招聘会笔试题