如何使用springdatacassandra将一篇带有作者和注解列表的文章Map到一个表中,以便将所有这些聚合数据存储在同一个表中?
课后:
@Table(value = "posts")
public class Post {
private UUID id;
private Instant moment;
private String title;
private String body;
private Author author;
private List<Comment> comments = new ArrayList<>();
(...)
author类(该id引用另一个表中的用户):
public class Author {
private UUID id;
private String name;
(...)
评论类:
public class Comment {
private String text;
private Instant moment;
(...)
暂无答案!
目前还没有任何答案,快来回答吧!