I'm developing a Client-Server-Application with Hibernate as persistence layer and Jersey REST for network communication.
Given a user with roles:
when I want to display all users in the client, I don't want the roles to be loaded by Hibernate and I don't want them to be sent over the network
when I want to modify the user's roles, I...
Suppose you have class B with lazily loaded property c. And that this is fine everywhere in the system except the following:
You have a class A with property b of class B. Whenever you load an entity of type A you want to load the full a.b.c chain non-lazily.
Is there a way to set up this type of logic in Hibernate?
Edit:
A propert...
I'm using DataNucleus as a JPA implementation to store my classes in my web application. I use a set of converters which all have toDTO() and fromDTO().
My issue is, that I want to avoid the whole DB being sent over the wire:
If I lazy load, the converter will try to access ALL the fields, and load then (resulting in very eager l...
In a special case we do not want to change mapping files and adding lazy="false" to each of them because of upgrading NHibernate. Is it possible to disable lazy loading in a total application by just adding something to app.config or web.config?
...
Take this class as example:
public class Category : PersistentObject<int>
{
public virtual string Title { get; set; }
public virtual string Alias { get; set; }
public virtual Category ParentCategory { get; set; }
public virtual ISet<Category> ChildCategories { get; set; }
public /*virtual*/ void Add(Category child...
I have the following mapping for a Relation in Castle AR
[BelongsTo("EVENT_ID", Lazy = FetchWhen.OnInvoke)]
public EventType PayEvent
{
get
{
return m_PayEvent;
}
set
{
m_PayEvent = value;
}
}
But the Relatio...
Let's say I have two entities, Employee and Skill. Every employee has a set of skills. Now when I load the skills lazily through the Employee instances the cache is not used for skills in different instances of Employee.
Let's Consider the following data set.
Employee - 1 : Java, PHP
Employee - 2 : Java, PHP
When I load Employee - ...
We have a entity with a many-to-many collection mapped as a lazy loaded bag. When we load up the entity, the collection is not loaded - great. Now we want to add a new entity to that collection. As soon as we do this, the collection is loaded up.
How do we add the new entity without loading up the whole collection (the collection is lar...
My application pulls a large amount of data from an external source - normally across the internet - and stores it locally on the application server.
Currently, as a user starts a new project we aggressively try to pull the data from the external source based on the order that we predict the user will want to access it. This process ca...
Hello All
i am facing a problem.I have a 2 Model projects and ProjectChangeRequest.
one project have multiple change request.
Now on Nhibernate mapping xml file i have taken class like this
in Project
<class name="Project" table="project" lazy="false">
<id name="ProjectID" column="ProjectID">
<generator class="native" />
...
Ya is this possible :) ?
...
I have a domain object that has an attribute which is a collection containing another domain object. This is accomplished using a hibernate mapping (which eventually performs a join on another table). Hibernate, by default, seems to lazily instantiate this collection. This turns out to be a great thing because, depending upon what I n...
Hi,
My object looks something like this:
class
{
int a;
object b;
IList<string> c;
}
All the fields are getting populated from the database and the collection is getting lazy initialization which is desirable.
Now, my problem is that I want to send this object to the web service. But since the collection is lazily loaded...
Is it possible to use TextBox in "virtual" mode.
I want to supply text on demand, when user scrolls through the document.
...
Does SubSonic 2.2 support lazy loading? Can I lazy load a property of an object? If yes, where can I find info on this?
...
[Updated with mapping files]
Ran into an issue with a lazy loaded / proxied object being persisted today.
It relates to two classes, Invoice and Address. A invoice has an Address property. Both classes are setup to be lazy loaded and all methods are virtual.
In the code I do a Invoice.address = HomeCompany.address and I can verify at ...
We're developing a pretty large application with MVC 2 RC2 and we've received some feedback on the way we're using the Entity Framework's Lazy Loading.
We're just getting the entities in the controller and sending them as models to the Views, that is causing that the view code asks the Database for the navigation properties we are usin...
I'm using Ninject 1.0 and would like to be able to inject lazy initialisation delegates into constructors. So, given the generic delegate definition:
public delegate T LazyGet<T>();
I'd simply like to bind this to IKernel.Get() so that I can pass a lazy getter into constructors, e.g.
public class Foo
{
readonly LazyGet<Bar> getBa...
This plugin doesn't seem to do the job for IE6 with jQuery 1.3.2 ( haven't tested 1.4.2 ):
http://www.appelsiini.net/projects/lazyload
...
I'm writing a quiz application for iPhone using basic NSObject subclasses to represent the models. At runtime the various controllers instantiate the model classes and populate them with data read in from a plist on the disk.
The model classes represent the basic hierarchy of a multiple choice quiz:
One application has many quizzes
O...