addLinked(owner, q);
return q;
}
public Comment addComment(Linked linked, User user, String text) {
Comment comment = new Comment();
comment.setText(text);
comment.setUser(user);
comment.setTimestamp(new Date());
em.persist(comment);
// linked comments
Set<Comment> comments = linked.getComments();
if (comments == null) {
comments = new HashSet<Comment>();