NHibernate and query optimization
I am using NHibernate as my ORM solution and need to get a very specialized object (for performance reasons) that is different from my original object.
Did he actually set up a second object with its own mapping file so that I could set a custom fetch of connections and set the batch size, etc.? Can 2 classes go back to the same table? Will this lead to some strange results when trying to update the original object?
Should I try to set runtime parameters for this sample plan?
Maybe use a stored procedure for this?
This object structure is complex and involves moving around collections of collections, and I am trying to remove the coolness of the original object. I love the sound of option 1 as it would seem to be the easiest to set up and get started.
source to share
Could you give an example of what you are trying to do? There are many solutions to this problem.
Knowing no more, I would say by sounds you are looking for custom ResultTranformers.
You can see an example of the one used to query partial objects:
http://ayende.com/Blog/archive/2007/08/26/Partial-Object-Queries-With-NHibernate.aspx
source to share