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.
我想在休眠条件下进行以下查询
SELECT * FROM ORDERS O, PRODUCT P WHERE O.ORDER_ID=P.ORDER_ID and order.orderName='xyz';
感谢您的帮助
请尝试以下:
List orders = sess.createCriteria(Order.class) .createCriteria("products", "product") .add( Restrictions.eq("orderName", "xyz") ) .setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP) .list();
希望有帮助。