lazy-loading

Is it possible to use lazy-loading function in EntityFramework4 in conjunction with WCF?

my application is using WPF for UI, WCF for WebService, EF4 for DataAccess. I read some materials from internet and msdn that EF4 has self-tracking function using custom T4 template even if using together with WCF for ntier. Does this mean that lazy loading function is still possible with WCF? Thanks ...

Force eager loading of otherwise lazy loaded properties

Hi. I've got a Hibernate object which's properties are all loaded lazy. Most of these properties are other Hibernate objects or PersistentSets. Now I want to force Hibernate to eager load these properties for just one time. Of course I could "touch" each of these properties with object.getSite().size() but maybe there's another way to...

JPA (Hibernate) - Session/Transaction and lazy loading

Hello! I have a Java EE project and the MySQL database is managed with an ORM. I worked a lot with Hibernate to learn what I am doing wrong and I think I understand session/transaction, but I do not know how I can solve this in my case/architecture. I have a Project and a Person which are in a bi-directional n:m relation with a join ta...

Lazy loading with wpf Data Grid

Initially I am populating 100 rows in Data grid, when user scroll the grid rows, I want to populate another 100 rows. I am using wpf data grid, I have not found any event of data grid that I can catch to accomplish this task. Then I have used scroll viewer control and try to catch change event where I know that my scroll viewer reach at ...

Load CKeditor and Jquery on demand

I currently use CKEditor on my website, however not every time users access the page CKEditor is needed. The flow is the following: user enters the page and see all the articles there; if users wants to edit the article he ou she opens editor and does that. Cureently CKEditor is loaded in the hidden div and not used 60% of time. Is there...

Hibernate LazyInitializationException: failed to lazily initialize a collection of role

I have a web service which is essentially a wrapper for a DAO. I am calling the web service/DAO to request a collection of entities. The "parent" entity class contains a collection of "child" entity objects, i.e. a one-to-many relationship. The DAO method call which fetches the "parent" entity collection (i.e. myDAO.findAll()) retur...

Why am I getting JPA LazyInitializationException when using Spring OpenEntityManagerInViewFilter?

My application of OEIV Filter doesn't seem to be getting applied to my Struts actions. I am using Spring 3, Spring Security 3, Struts2, Tiles2 and JPA backed by Hibernate 3. When I try to access a collection for an entity in a struts action, unless the Entity has a fetch type of eager, I am getting a JPA LazyInitializationException. I s...

conditionally load javascript (external and internal) and keep execution order

I'm looking for a way to conditionally load and keep the execution order of some javascript files (external and internal) without any library dependency. Basically, what I want to do is load them up only if the browser supports localStorage. Here's basically my shell: if (window.localStorage) { //load up JS only if it's needed var...

Lazy loading in MongoDB with NoRM

I have a model similar to this: (simplified) Question: public class Question { public string QuestionID { get; set; } public string Title { get; set; } public string Body { get; set; } public List<Answer> Answers { get; set; } } Answer: public class Answer { public string QuestionID { get; set; } public str...

Navigational properties lazily loaded even when ObjectContext.ContextOptions.LazyLoadingEnabled = false

I commented out the line of code that enables lazy loading from all the ctor overloads for my ObjectContext class, yet when I iterate over a navigational property, the iteration is successful. Why? Here's the relevant bits of code. public MyExpensesEntities() : base("name=MyExpensesEntities", "MyExpensesEntities")...

Lazy loading from SQLite.

I have some 4500 entries in my database. What is the best way to show them in a ListView. Should I load them all in one stretch when the application initializes or should I use lazy loading? The list will also be searchable and filterable. Could you also point me to some nice articles that would gimme a better idea. Please do give me sug...

Lazy loading images how...

Hello... I am developing an eshop .At products page based on category i putted some javascript based filtering. However a problem arises if a category has a lot of products. This link has something similar i do ... http://www.snowandrock.com/sunglasses/snowboard/fcp-category/list?resetFilters=true How ever this page is painfully slow a...

Lazy loading System.Windows.Control.Image only when visible

I need my application to render an image only when it becomes visible to the user. I tried attaching. I've tried the following (f#): image.IsVisibleChanged.Add(fun e -> if image.IsVisible & mtvCapture.Capture <> null then mtvCapture.BeginCapture() ) But this just loads, doesn't lazy load. How does IsV...

Rails3 - why my view loading times are so long?

So one week ago I started to move my old app written in Rails 2.3.5 to new 3.0. Unfortunately, I found out that some of the views are loading surprisingly slow. Example: Rails 2.3.5 Ruby 1.8.7 -> WEBrick: Completed in 297ms (View: 143, DB: 40) Rails 3.0.0 Ruby 1.8.7 -> WEBrick: Completed in 3081ms (View: 261, ActiveRecord: 108) Rails ...

Lazy loading returns equal records.

I have entities: public class Document : PersistentObjectBase { public virtual long? FolderId { get; set; } } <id name="Id" column="ID"> <generator class="identity" /> </id> <version column="VERSION" name="Version" type="Int64" unsaved-value="undefined" /> <property name="FolderId" column="FOLDER" /> ...

Object with Lazy initialization-adding to Session or Viewstate

I have a two tier architecture based website-data layer and UI layer. I have a web page, I get the id of a customer from the querystring and I build the customer object from that id. I have several tabs in my webpage, so, unless I need the data, I dont have to load the data for the grids which are in the tabs that are not clicked. That's...