If a project has used POCO for entities and uses entity framework and uses lazy loading then you have an "incomplete" object graph going back over the wire. So when a client uses the Entity is there some sort of proxy that will automagically load the remaining values? Do we have to create this proxy ourselves and wrap the original entity...
I have an application using Fluent NHibernate on the server side to configure the database. Fluent uses Lazyloading as default, but I explicitly disabled this as this gave me problems when sending the objects to the client side. Obviously the client can't load the objects lazily as it doesn't have access to the database.
Now I try reen...
I have an application where a client communicates with a server side through REST. This is written in .Net, but I guess the question should be independent of this.
Now - I have services such as GetAllCustomers and GetCustomerById. A Customer has references to a potentially big list of Order, so I don't want to pass the Customers refere...
I have Fluent mappings that maps a fictional class Customer to a list of Orders. Now I want to fetch all Customers from the database without loading Orders. Can this be specified somehow in the query/criterion/etc, or is LazyLoading the only solution?
Fictional classes:
public class Customer
{
public virtual int Id { get; set; }
...
Version 1:
<style>
embed {
display: none;
}
</style>
<script>
var p1 = 0;
var p2 = 1;
var amount = 0;
/* var counter = 0; */
$(window).scroll(function() {
/*if(counter % 2 === 0){ */
if($(window).scrollTop() >= amount){
amount+=500;
if(!($('embed').slice(p1,p2).show())){
$(window).unbind("scroll");
}
++p1;++p...
I have JSF application with trinidad components and JAXB/JPA entity beans generated by Hyperjaxb3. In the UI I use Trinidad combo box component that has JPA object as values.
The scenario is:
User make selection in combo box
User clicks on a control that sends request to the server and is returned to the same form
Data from the form w...
I want to lazy-load the results of my Youtube API search, so that as the user scrolls down, Youtube players are being added to the page. It seems that the lazy loading plugins are focused on images, but what I will be loading is just HTML, because I'm using iFrames to load the Youtube players (as per the new Youtube embed style). How can...
I have a (fictional) class with Fluent-mapping:
public class Customer
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual Employee Responsible { get; set; }
public virtual IList<Order> Orders { get; set; }
}
public class CustomerMapping : ClassMap<Customer
{
public Cus...
Hi all, I have a bare bones ORM implementation, consisting of data mappers which load and persist entities. Each mapper internally manages an identity map for all entities read from the database, so that the same entity is only loaded into memory once.
I am currently implementing lazy loading for related entities using a proxy class th...
I am experiencing a mid-career philosophical architectural crisis. I see the very clear lines between what is considered client code (UI, Web Services, MVC, MVP, etc) and the Service Layer. The lines from the Service layer back, though, are getting more blurred by the minute. And it all started with the ability to query code with Linq...
I have a list view with 100 different images. My cache looks like the following,
public class ImageCache {
HashMap<String, SoftReference<Drawable>> myCache;
....
....
public void putImage(String key, Drawable d) {
myCache.put(key, new SoftReference<Drawable>(d));
}
public Drawable getImage(String key) {
...
I have found this example http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview/3068012#3068012 from Fedor which is absolutely great for what I need.
I have a question. if beside the Clear Cache button there would be a TextView how could I put in there how many images from total images had dow...
I have found this example http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview/3068012#3068012 from Fedor which is absolutely great for what I need.
I have a question. if beside the Clear Cache button there would be a button with Cancel. How could I in onClick cancel the image download thread...
Hi all, there is a way to test if a collection is already initialized? try-catch only?
I have a function work with a lazy collection, and i need to load it only if is not already loaded.
Thanks you.
...
I'm building a web application and using lazy-loading as default. I would like the application to keep going even if I "forgot" (or did it by purpose) to load some sub-entities. This will make the application robust enough to avoid NullReferenceException.
BUT - I do want to count, somehow, the number of times lazy loading happened and l...
I have created a class in which I have set some of it's fields (other entities) to be LAZY loaded. Now I need to use this object after it has been detached from the session, so I obviously need to make sure all the fields that I need are populated before detaching it. I tried just calling the getters to these lazy fields but that didn't ...
I'm following the fairly standard L2S repository pattern, using the following as one of the methods
public IEnumerable<T> GetAllByFilter(Func<T, bool> expression)
{
return _dataContext.GetTable<T>().Where(expression);
}
I'm a bit miffed to see that the call to GetTable appears to literally get the table, with the Where expressi...
I'm using the CTP4 code first EF framework, but I'm having problems getting lazy loading to work. Reading up on it, it should be simple, but it's just not
public class Folder
{
public int Id { get; set; }
public string Name { get; set; }
public int? ParentFolderId { get; set; }
public virtual IList<Folder> ChildFolders...
I'm accessing database to bulk populate fields.
PopulateAobjs();
PopulateBobjs();
PopulateCobjs();
...
Once the values are populated, I store the entities in a Dictionary<Id, Entity>.
I'd like to make this process lazy, in such a way that, if I don't need C objects then I don't need to call that method. etc.
How can this be done?
L...
When a browser has JavaScript disabled, is the request for the .js files still made to the server (ie the files still end up downloaded on the client, but not parsed) ?
The reason I'm asking is to see if it's worth implementing lazy-loading JavaScript files as to prevent the browser from requesting them if JavaScript is disabled; ie onl...