-->
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.  [ 2 posts ] 
Author Message
 Post subject: Overriding non-lazy instantiation via code
PostPosted: Tue Apr 12, 2005 3:36 am 
Newbie

Joined: Fri Jan 14, 2005 8:30 pm
Posts: 11
We've got a set of mapping files setup with *no* lazy-instantiation. As noted in the docs, this is the easy way to avoid problems with querying on associated objects after a session has closed and has worked well so far while we're getting the system built and not focused on performance.

Later we are planning to shift everything to lazy-instantiated in our mapping documents and then override that as needed via code. That we know how to do.

But as a quick-fix (before we get our model and code using lazy-instantiation) is there a way to force lazy-instantiation on just a single query? I know you can do it the other way around (force non-lazy behavior when lazy is declared in the maping documents) but I'm uncelar if the reverse is true.

So, without all the preamble, here's the question:

Is it possible to override a non-lazy mapping definition, via code, for a particular query?

Many thanks,

- Gary


Hibernate version:
2.1

Name and version of the database you are using:

MySQL 4.1.8


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 12, 2005 6:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
no you can only do the other way around.

/max

_________________
Max
Don't forget to rate


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

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.