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 O.*, P.* FROM ORDERS O, PRODUCT P WHERE O.ORDER_ID=P.ORDER_ID;
上述查询的 Criteria 表示形式是什么?
如果你有这样的事情:
public class Order { public virtual ISet<Product> Products {get;set} }
你需要做
session.CreateCriteria(typeof(Order)) .SetFetchMode("Products", FetchMode.Eager) .List();
而已。