-->
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: Extending Save/Update to include multiple update levels
PostPosted: Thu Jun 02, 2005 5:21 pm 
Senior
Senior

Joined: Thu Jun 02, 2005 5:03 pm
Posts: 135
Location: Paris
Howdy all,

I'm new to nHibernate (great piece of work, btw) and I'm hoping to make a change to nHibernate for my own (evil :twisted: ) purposes:

I'm wanting to be able to dynamically change the set of fields included in the Insert and Update SQL statements based on an "update-level".

I was thinking of changing the Save/Update methods to accept an additonal integer parameter indicating the "update-level" and having the persister process this value against a slightly altered mapping file where "update = true|false" is replaced with "update = [0-9]".

Can anyone give me a couple of hints as to where in the code I should go looking?

Cheers,

Symon.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 03, 2005 4:03 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Persisters are responsible for inserts/updates (and selects too, but they delegate most of the work to Loaders). So look into AbstractEntityPersister and classes derived from it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 03, 2005 8:04 pm 
Senior
Senior

Joined: Thu Jun 02, 2005 5:03 pm
Posts: 135
Location: Paris
Cheers Sergey,

I'm digging in now - appreciate the tip.

Symon.


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.