-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to set a class do use Dynamic Insert/Update at runtime?
PostPosted: Wed Jun 21, 2006 1:21 pm 
Regular
Regular

Joined: Wed Sep 28, 2005 6:45 pm
Posts: 56
I want to be able to switch between using/not using dynamic inserts at runtime, and I wonder how I can do it?

I noticed a class org.hibernate.mapping.PersistentClass that has a method setDynamicInsert(boolean dynamicInsert) which is just about what I want, but I can't seem to find any way to use it...

Thanks in advance for any help :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 21, 2006 1:27 pm 
Expert
Expert

Joined: Tue Apr 25, 2006 12:04 pm
Posts: 260
In hibernate 3.0 you can use something like as below.

Code:
<class name="Persistent"
          table="P_Table"
          dynamic-insert="true"
          dynamic-update="true">   


I suppose this is the one you were searching for.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 21, 2006 1:45 pm 
Regular
Regular

Joined: Wed Sep 28, 2005 6:45 pm
Posts: 56
No, I wanted to do it at runtime.

If dynamic insert/updates are on at all times, I can't set a column to null, which I want to be able to do.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.