Kayaknya sintaks di atas nya itu HQL bukan JPAQL sedangkan EJB3 itu pake JPAQL.
On Thu, Jul 17, 2008 at 10:51 AM, widya perwira <[EMAIL PROTECTED]> wrote: > *ini di package facade nya :* > > public Mobil findBMerek(String merekMobil) throws Exception { > Mobil result = null; > try{ > System.out.println("Lewat Facade 1"); > result = (Mobil)em.createNamedQuery("Mobil.findByMerek"). > setParameter("merekMobil",merekMobil). > getSingleResult(); > System.out.println("Lewat Facade 2"); > }catch(Exception e){ > e.printStackTrace(); > } > return result; > } > > > *ini di package datamodel :* > > @NamedQuery(name = "Mobil.findByMerek", query = "SELECT m FROM Mobil m > WHERE m.merekMobil = :merekMobil"), > > > > -- > http://widyaperwira.wordpress.com > http://perwirautama.blogspot.com > > > -Widz- > > -- Mujoko