commenthread

git-svn-id: svn://svn.dsv.su.se/scipro/scipro/trunk@463 73ecded7-942e-4092-bab0-0e58ef0ee984
This commit is contained in:
joha-asc 2011-03-24 10:21:56 +00:00
parent b8ec3b5719
commit 63fc8c7971

@ -61,16 +61,16 @@ public class CommentThreadDaoJPAImp extends AbstractDaoJPAImp<CommentThread>
}
@Transactional
public Comment getCommentThreadByComment(final Comment comment) {
return getJpaTemplate().execute(new JpaCallback<Comment>() {
public Comment doInJpa(EntityManager em)
public CommentThread getCommentThreadByComment(final Comment comment) {
return getJpaTemplate().execute(new JpaCallback<CommentThread>() {
public CommentThread doInJpa(EntityManager em)
throws PersistenceException {
String q = "select t " +
"from CommentThread t, Comment c, IN(t.commentList) cl " +
"where c = :comment and c = cl";
TypedQuery<Comment> query = em.createQuery(q, Comment.class);
TypedQuery<CommentThread> query = em.createQuery(q, CommentThread.class);
query.setParameter("comment", comment);
try {