You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to suggest you add support for lazy loading.
public interface RDFProxy {
public boolean isLoaded();
public Object load(Session session);
}
The following should be provided:
Proxies should have a common interface
Proxy interface should have methods to:
determine if the object has been loaded
load the underlying object using supplied session.
Session should provide support for bulk load of collection of proxies
I think most other persistent mechanisms do not store a session in a proxy and will only load the proxies in the context of a session. I think it is a lot safer to store sessionFactory in the proxy.
The proxy code for loading the object will use sessionFactory.currentSession for loading the object.
The text was updated successfully, but these errors were encountered:
How is the lazy loading done from the user's perspective? implicitly or explicitly?
Does the interface contract work? Why not isLoaded() and load()? The proxy extends the class to be loaded, so there shouldn't be a reason to provide an external object for the target, unless I misunderstood the design.
IMHO using the session used for loading the object should also be used for lazy loading. This is conceptually simpler, is widely used and guarantees that the lazily loaded state is (or has been) valid in the scope of the current session.
Can you provide maybe a domain class example and some imagined RDFBean API usage for lazy loading?
I would like to suggest you add support for lazy loading.
The following should be provided:
I think most other persistent mechanisms do not store a session in a proxy and will only load the proxies in the context of a session. I think it is a lot safer to store sessionFactory in the proxy.
The proxy code for loading the object will use sessionFactory.currentSession for loading the object.
The text was updated successfully, but these errors were encountered: