Hello fellows I have simple problem. Let sey that i have two simple tables and relation one to many. Also i have of course two classes and bunch of objects where some objects have containers (list) of another objects (one to many relation).
DB is getting many new rows to table with entities from List, let say each minute. Now i want to keep my Objects kinda fresh, but now look at my problem. If i have object which have List with 200 other objects and I know that there is one new object in DB to download. I can now do two things: 1. Download one big object (with list of anothers) by making select through "ICriteria sc = sessionN.CreateCriteria(typeof(Class)); sc.Add(NHibernate.Criterion.Expression.Like..." 2. Download one new row through similar ICriteria thing. And then mannualy put it to my object in app. But what i see is when i select one object. NHibernate downalods whole object with list and others. And that is just to much... If i have every table in relations, at the end, every simple select is downloading big part of my DB.
How to deal with it?
|