-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to efficiently get a row
PostPosted: Tue Jul 27, 2010 1:12 pm 
Newbie

Joined: Sun Jul 11, 2010 5:08 pm
Posts: 4
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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.