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