Hello,
I am learning ObjectDB now. I create a simple Dao method as below:
public boolean isJobExist(String name) { TypedQuery<Long> query = em.createQuery( "SELECT count(j) FROM MFJob j WHERE j.jobName = :name", Long.class); return query.setParameter("name", name).getSingleResult()>0 ? true : false; }
Once I compile it, Error:
C:\Users\xxx\xxxxx\vobs\xxxxx\xxxxx\src\main\java\com\xxxx\ xxxx \xxxx\dao\JobDao.java:75: createQuery(java.lang.String) in javax.persistence.EntityManager cannot be applied to (java.lang.String,java.lang.Class<java.lang.Long>) [javac] TypedQuery<Long> query = em.createQuery(
-----------------------------------
Sounds like I am using jpa 1.0 implement, but I do have objectdb.jar in my classpath. can anybody help?
thanks