lazy-loading

LazyInitializationException in Spring

Hello, I'm getting a LazyInitializationException in my Spring Application. I have the OpenEntityManagerInViewFilter configured so I have all my relations set as FetchType.LAZY and they all work. The problem is when I try to access the user which is in session via Spring Security and print LAZY information in the JSP, something like this...

How yield implements the pattern of lazy loading?

How yield implements the pattern of lazy loading? ...

EclipseLink: onetomany relationships with lazy loading loaded with serialization

Hello, I'm facing a problem with eclipselink under websphere 7.0 in a clustered environment. When my entity is serialized every 1-n relationship lazy is loaded, even if the entity is detached. How can I avoid this behavior, without having to use DTO? Thank you very much ...

lazy loading images in UIScrollView

I have an application the requires scrolling of many images. because I can not load all the images, and save it in the memory, I am lazy loading them. The problem is if I scroll too quickly, there are "black images" showing (images that did not manage to load). this is the lazy loading code: int currentImageToLoad = [self cal...

Keeping Linq to SQL alive when using ViewModels (ASP.NET MVC)

I have recently started using custom ViewModels (For example, CustomerViewModel) public class CustomerViewModel { public IList<Customer> Customers{ get; set; } public int ProductId{ get; set; } public CustomerViewModel(IList<Customer> customers, int productId) { this.Customers= customers; this.Product...

NHibernate lazy properties behavior?

I've been trying to get NHibernate into development for a project I'm working on at my workplace. Since I have to put a strong emphasis on performance, I've been running a proof-of-concept stress test on an existing project's table with thousands of records, all of which contain a large text column. However, when selecting a collection ...

Lazy load images when they come into the viewport

I've been coming across blogs/websites lately that only load images when they are scrolled into the visible viewport. It then fades them in. Is there a jQuery ... even Wordpress plug-in that does this? e.g. http://icodeblog.com ...

IQueryable and lazy loading

I'm having a hard time determining the best way to handle this... With Entity Framework (and L2S), LINQ queries return IQueryable. I have read various opinions on whether the DAL/BLL should return IQueryable, IEnumerable or IList. Assuming we go with IList, then the query is run immediately and that control is not passed on to the nex...

How to implement lazy tables in more than view in iphone?

I am new to iphone development.I want to implement lazy tables in many views.How can i do that? I am have two url and i want to parse it in the delegate class and implement it in both view,Please help me out.Any sample code for implementing lazy tables in more view will be more useful.Thanks. ...

Lazy/deferred loading of a CollectionViewSource?

When you create a CollectionViewSource in the Resources section, is the set Source loaded when the resources are initalized (i.e. when the Resources holder is inited) or when data is bound? Is there a xamly way to make a CollectionViewSource lazy-load? deferred-load? explicit-load? ...

Prevent lazy loading in nHibernate

Hi, I'm storing some blobs in my database, so I have a Document table and a DocumentContent table. Document contains a filename, description etc and has a DocumentContent property. I have a Silverlight client, so I don't want to load up and send the DocumentContent to the client unless I explicity ask for it, but I'm having trouble do...

lazy loading images in UITableView iPhone SDK

Hi All, I need to implement the lazy loading concept for the images in my tableview, so that the user will be provided with the textual data initially and later the images. How can i implement this in to my app.. help needed.. please Thanks in advance Shibin ...

Checking lazy loaded properties have been instantiated

In a class which has a lazy loaded property, such as: private Collection<int> someInts; public Collection<int> SomeInts { get { if (this.someInts == null) this.someInts = new Collection<int>(); return this.someInts; } } Is it worth also having a property such as: public bool SomeIntsExist { get { retu...

Does Entity Framework 4 not support property automatic lazy loading for model-first entities?

All references that I find for lazy loading say it's possible but they all mention POCOs and that's it. I am using EF4 with the model-first methodology. In my model diagram I have a Project table and a UserObject table, with a 1 to many relationship between them. However, in code, when I have a valid UserObject and I attempt to get th...

Protecting sensitive entity data

Hi, I'm looking for some advice on architecture for a client/server solution with some peculiarities. The client is a fairly thick one, leaving the server mostly to peristence, concurrency and infrastructure concerns. The server contains a number of entities which contain both sensitive and public information. Think for example that the...

Why does the entity framework need an ICollection for lazy loading?

I want to write a rich domain class such as public class Product { public IEnumerable<Photo> Photos {get; private set;} public void AddPhoto(){...} public void RemovePhoto(){...} } But the entity framework (V4 code first approach) requires an ICollection type for lazy loading! The above code no longer works ...

ASP.Net Entity Framework, objectcontext error

I'm building a 4 layered ASP.Net web application. The layers are: Data Layer Entity Layer Business Layer UI Layer The entity layer has my data model classes and is built from my entity data model (edmx file) in the datalayer using T4 templates (POCO). The entity layer is referenced in all other layers. My data layer has a class call...

jsf datatable lazy load filter and sorting

Hi, I have worked on several projects with a lot of data tables. The tables had sorting, filtering and paging of course on server side and with help of the db (all databases has implemented sording, filtering -where and limit the returned results). When workig on real application there are a thousands of even a millions rows. But I ha...

Automatic Lazyloading on Entity Framework 4.0

Suppose I have an Entity Order with OrderDetails as child preperty. I enable lazyloading like this: _context.ContextOptions.LazyLoadingEnabled = true; I Can feed a view with a method like this: Order.GetAll() And navigate by the order details automatically without getting the wirerd "Object reference not set to an instance of an ...

Hibernate count collection size without initializing

Hi, Is there a way I can count the size of an associated collection without initializing? e.g. Select count(p.children) from Parent p (there is a good reason why I cant do this any other way as my where clause is more complicated and my from clause is a polymorphic query) Thanks. ...