开发者

Queries for Objects in NHIbernate?

I am going through the book NHIbernate in Action. I have read querying chapters in it which I understood also using ICriteria and IQuery. But I came across one more topic Queries for Objects....What does this statement mean actually?

There was a query "from Bid" which retrieves all instances of a particular persistent class. Wasn't this type of query used to q开发者_如何学Pythonuery the records from the database table which stores the data of objects. How can we retrieve all the instances of the persistent class?


CreateQuery("from Bid") returns all the persistent instances of Bid.

NHibernate queries operate on objects, not on tables.

CreateSQLQuery is used when actual SQL is needed, and even that can return object instances if you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜