An ORM for Java with intelligent loading and caching