-->
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: Modify at runtime
PostPosted: Mon Jul 18, 2005 10:15 pm 
Regular
Regular

Joined: Wed May 11, 2005 11:57 pm
Posts: 80
You can also override the configuration programatically at run time, like this:

Code:
Configuration config = new Configuration().configure( configFileUrl );
((Collection)config.getClassMapping(Instructor.class).getProperty("courses").getValue()).setLazy( true );


This will be passed into the SessionFactory and will control the behavior for the application, as if it had been hard-coded into the mapping file. Although I haven't done it, you could probably do some looping code to do this en masse for the whole configuration.

--Jesse


Top
 Profile  
 
 Post subject: Oops
PostPosted: Mon Jul 18, 2005 10:18 pm 
Regular
Regular

Joined: Wed May 11, 2005 11:57 pm
Posts: 80
Sorry, hit new post instead of reply. Burned a credit in the process... :-\


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.