From 42c476abf2912e2bdfc8965cbf137a045f809429 Mon Sep 17 00:00:00 2001 From: erik Date: Sat, 23 Feb 2008 20:15:09 +0000 Subject: [PATCH] query is now JPA query. --- .../src/main/java/org/wamblee/mythtv/Recording.java | 7 ------- .../main/java/org/wamblee/mythtv/RecordingDatabase.java | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/mythtv/monitor/src/main/java/org/wamblee/mythtv/Recording.java b/mythtv/monitor/src/main/java/org/wamblee/mythtv/Recording.java index da7220de..a1e7844e 100644 --- a/mythtv/monitor/src/main/java/org/wamblee/mythtv/Recording.java +++ b/mythtv/monitor/src/main/java/org/wamblee/mythtv/Recording.java @@ -54,13 +54,6 @@ public class Recording implements Serializable { protected Recording() { // Empty } - - /** - * @return the channel - */ - //@Id - //@ManyToOne(targetEntity=Channel.class) - //@JoinColumn(name="chanid") /** * @return the id diff --git a/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java b/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java index e4badfba..cf7bc5f5 100644 --- a/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java +++ b/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java @@ -58,7 +58,7 @@ public class RecordingDatabase extends JpaDaoSupport { JpaTemplate jpaTemplate = getJpaTemplate(); EntityManager entityManager = jpaTemplate.getEntityManager(); Query query = entityManager.createQuery( - "from org.wamblee.mythtv.Recording where basename = ?1"); + "select r from Recording r where r.basename = ?1"); query.setParameter(1, aName); List result = query.getResultList(); if ( result.size() > 1 ) { -- 2.31.1