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.
我想知道是否有办法获取用于创建标准的类的名称。
例子 :
Criteria c = session.createCriteria(MyClasse.class)
所以我想知道,当我有标准 c 时,使用 MyClasse 来制作它
谢谢你
您可以通过以下方式获取标准的实体或类名,
Criteria c = sessionFactory.getCurrentSession().createCriteria(Customer.class); ((CriteriaImpl) c).getEntityOrClassName() - would give you Customer