mysema / rdfbean

RDFBean - Object/RDF persistence for Java
19 stars 5 forks source link

Lazy loading #14

Open corneil opened 12 years ago

corneil commented 12 years ago

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:

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.

timowest commented 12 years ago

How about the following

Can you provide maybe a domain class example and some imagined RDFBean API usage for lazy loading?