The following jpa code works with mysql but not with objectdb. Why would this happen? The provider the both jpas is the same: EclipseLink. The link for the one used with mysql is org.eclipse.persistence.jpa.PersistenceProvider; the one for objectdb is com.objectdb.jpa.Provider (per the tutorials).
public Friendship getFriendship(String username) { CriteriaBuilder criteriaBuilder = em.getCriteriaBuilder(); CriteriaQuery<Friendship> query = criteriaBuilder.createQuery(Friendship.class); Root<Friendship> root = query.from(Friendship.class); Path<String> path = root.<String>get("username"); query.where(criteriaBuilder.equal(path, username)); return em.createQuery(query).getSingleResult(); }