Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用基于休眠模式(每个租户一个模式)的多租户,如此处所述。我想按照此处所述执行新的 JPA 标准查询 (javax.persistence.criteria.CriteriaQuery)吗?
List<Person> people = entityManager.createQuery(criteria).getResultList();
如何获得正确的 EntityManager 对象以在适当的租户模式的上下文中执行查询?
休眠版本 4.2