From: erik Date: Sat, 23 Feb 2008 20:15:09 +0000 (+0000) Subject: query is now JPA query. X-Git-Tag: wamblee-utils-0.2@603~248 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=a964323a6d16801ba33a24c543d323547a799957;p=utils query is now JPA query. --- diff --git a/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/Recording.java b/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/Recording.java index da7220de..a1e7844e 100644 --- a/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/Recording.java +++ b/trunk/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/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java b/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java index e4badfba..cf7bc5f5 100644 --- a/trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingDatabase.java +++ b/trunk/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 ) {