lazy-loading

c# Ajax Lazy Loading

Hi All, I need to populate 4 GridViews on an aspx page, but I only bind a datatable to one of them on page load. I need to pupulate the other 3 after page load. does anyone know the best way to do this using ajax ? Currently I'm using javascript to __doPostBack on a button that pupulates the 3 GridViews but unfortunately this forces...

Accessing Aggregate Entities without Lazy Loading

I want to follow the DDD philosophy and not access entity objects of an aggregate directly. So, i have to call the root object to get the associated entity. But In other cases I dont always want every associated entity to load when the root is called. Is that the purpose of lazy loading? How do I access entity objects through the root...

wcf serialization and nhibernate lazy loading

I'm using .net 2.0 with NHibernate/ActiveRecord and WCF. I haven't been using NH Lazy load so far, but the performance penalties are too big to ignore, so I'm starting to use it. From what I've read so far, it's not an easy subject, using NH entities with lazy loading and serializing to WCF, but the benefits are too great to ignore. U...

Is Lazy Loading required for nHibernate?

It took me a long time but I finally got nHibernate's Hello World to work. It worked after I did "lazy loading." Honestly, I couldn't tell you why it all worked, but it did and now I am reading you don't need lazy loading. Is there a hello world that anyone has that is bare bones making nHibernate work? Do you have to have lazy loadi...

hibernate Open Session in View

i am using the following approach to sole lazy initialization problem in hibernate.Pleas tell me whether it will work or not . I have to implement my transcation in my persistance layer compulsary due to some reasons. public class CourseDAO { Session session = null; public CourseDAO() { this.session = this.session = Hi...

Can I lazy load scalar properties with the ADO.Net Entity Framework?

I've got a database table Image with one huge column: Data. I'd rather lazy load that one column so I'm not querying all that when I get a list of all my images. I know I can put the data into its own column and entity like this: But, do I have to? ...

Is my approach to lazy loading flawed?

Platform: Visual Studio 2008 SP1 with Resharper 4.1, .NET 3.5 I have a class with a static method, GetProperty<T> that returns a property value lazily. private static T GetProperty<T>(T backingField, Func<T> factory) where T : class { if (backingField == null) backingField = factory(); return backingField; } But...

Should I bother about lazy loading in a web application?

I've learned that to have a singleton lazy loading, this is the pattern to use: private MyObject() { } public static MyObject Instance { get { return SingletonCreator.CreatorInstance; } } private static class SingletonCreator { private static readonly MyObject _instance = new MyObject(); public static MyObject CreatorInst...

How can I add an element to a lazily-loaded collection in Hibernate without causing the collection to load?

What it says on the tin; I want to modify a collection in Hibernate without forcing the collection to load, since it is a large volume of data (~100,000 records, monotonically increasing). Right now, I add an element to this list by calling getEvents ().add (newEvent) which, of course, causes events to be populated. Here's the mapping...

Lazy One-to-One using Proxy not working

I've got a one-to-one relation between a dealer and a seller which should be lazy using a proxy. For the side on which the foreign key is defined (the seller, references the dealer), this works fine. But it doesn't work from the other side - the seller is always loaded eagerly. I set constrained="true" as described in "Some explanations ...

Lazy loading infragistics WinForm grid

Does anyone know if the Infragistics WinForm grid support lazy loading? ...

How should i lazy-generate a thumbnail image?

For background, i have a Data layer and Service layer loosely based on Rob Conery's Storefront model and like Rob's, many of my domain objects and chained with LazyList<>'s and LazyItem<>'s to make use of the deferred execution that Linq2Sql provides given that my Lazy* types utilise IQueryable<T> rather than this awesome delegate approa...

To Lazy Load or not in effort to improve performance

It has been suggested that in order to improve performance of our system that the use of lazy loading should be used across the board. That is to change the OneToOne mapping with the “mappedBy” property to the @OneToMany mapping. This is to address and stop the loading of unwanted data from the database which leads to slowness of the a...

How can I pull objects out of hibernate and into memory. I'm hitting session problems.

Hi, I have a rather enormous project in which I'm trying to retrofit in-memory data. Essentially, I have a big collection of objects which contain primitives and other objects which exist in hibernate. Large sections of non-dao code rely on lazy-loading through hibernate to hydrate objects on the fly. However, since everything exists in ...

How do I manually open a hibernate session?

I have a rather large project involving spring and hibernate. Right now, I'm backing certain objects out of hibernate and into memory, and I've hit a sort of snag. I have the following setup. Class A contains a number of primitives and a class B. B contains primitives and a class C, which was previously lazy-loaded. Now I have this ...

How to get an eager loaded conditional to be lazy loading later on with ActiveRecord and Rails

First let me show some code. class User has_and_belongs_to_many :roles named_scope :employees, { :conditions => ["roles.name = 'Employee'"], :include => :roles } end OK, so later in a controller I wanted to search for all the employees right. I set the named scope up to help do that with the join and conditional search. But the pr...

Waiting on Lazy Loaded objects without lockup?

I already have code which lazy loads scripts on request. My issue now is waiting to execute certain code until the object becomes available. I can't use a setTimeout() because it does not block execution. So what is a good way to 'wait' for a load, without locking the browser? Again, can't use raw setTimeout(). ...

JQuery to load Javascript file dynamically

I have a very large javascript file I would like to load only if the user clicks on a certain button. I am using jQuery as my framework. Is there a built-in method or plugin that will help me do this? Some more detail: I have a "Add Comment" button that should load the TinyMCE javascript file (I've boiled all the TinyMCE stuff down ...

ASP.NET HoverMenuExtender Lazy Loading

I'm trying to get my hovermenuextenders to do some lazy loading. I have avatars across the site that when hovered over should pull back various things (images, recent posts, post count, etc) For obvious reasons I don't want to do this for all avatars on the page_load. Using the following code I'm able to get the hover event to trigge...

How to only display a TreeView expand sign [+] if children exist

I've developed an application that populates a treeview from hierachical data in a database. I've designed it to use lazy-loading so it only gets the child nodes when a node is expanded. My problem is that obviously I don't know if a node has children unless I make a call to the database and look. Currently I have implemented a dummy c...