Spring Mongodb bi-directional dbref
Mongodb does not support bidirectional dbref, First of all as you kow. its is a Document based data storage using key-value pairs to store each data. If you want to store the Forum Data inside mongodb, you have to follow this particular document Structure
public class Forum { @Id private String forunId; private String forumTitle; private String description; private Date createdDate; @DBRef private List<Topic> topics}public class Topic { @Id private String topicId; private String topicName; @DBRef private List<Post> posts}public class Post { @Id private String postId; private String comment;}
Suggessions requested