-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: session.load not returning an uninitialized proxy
PostPosted: Fri May 02, 2008 5:43 pm 
Newbie

Joined: Fri May 02, 2008 5:15 pm
Posts: 1
Hibernate version:

3.2.2ga, Hibernate Annotations

I'm calling session.load(Category.class, id), but it appears that I'm being given a fully initialized entity, although I only want the proxy as to avoid the database hit. In what circumstance does session.load() behave like this? Here's the debug output:

17:19:20,797 - nsactionProtectionWrapper - DEBUG - allowing proxied method [load] to proceed to real session
17:19:20,803 - .DefaultLoadEventListener - DEBUG - loading entity: [test.Category#4]
17:19:20,810 - .DefaultLoadEventListener - DEBUG - attempting to resolve: [test.Category#4]
17:19:20,816 - .DefaultLoadEventListener - DEBUG - object not resolved in any cache: [test.Category#4]
17:19:20,823 - y.AbstractEntityPersister - DEBUG - Fetching entity: [test.Category#4]
17:19:20,830 - g.hibernate.loader.Loader - DEBUG - loading entity: [test.Category#4]
17:19:20,838 - nate.jdbc.AbstractBatcher - DEBUG - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)

* query is executed here *

I even tried placing the

@org.hibernate.annotations.Proxy(lazy = true)

annotation on the top of my Category class, but I'm still getting the same results.

Any ideas? Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.