I have my spring boot app. in which I have written below code at daoImpl layer.
@Autowired
EntityManager
CriteriaBuilder qb = em.getCriteriaBuilder();
CriteriaQuery<Person> c = qb.createQuery(Person.class);
Root<Person> p = c.from(Person.class);
where "Person" in an @Entity class placed in separate "commons" package.
It's throwing exception "Not an entity.." on second line although it passes the first line. Can someone help me out with the probable causes. This looks something weird to me since the same entity is been accepted on previous line but not on next line.