-->
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: Generating SQL for Insert
PostPosted: Fri Dec 28, 2007 3:26 pm 
Newbie

Joined: Thu Jan 12, 2006 8:17 am
Posts: 8
Hi all,

I need some help on generating the INSERT INTO query for a given instance.

Something like:

IList<MyNhObject> objects = GetAllOfThem();
foreach(MyNhObject obj in objects){
string sql = GetInsertSqlString(obj);
}

I need that to create a bulk inserter to Oracle.

Thanks for any help,
Bernardo Heynemann
Stormwind Project Committer
http://www.stormwindproject.org


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 04, 2008 1:47 am 
Beginner
Beginner

Joined: Fri Jan 12, 2007 1:08 am
Posts: 41
It is my understanding that bulk inserts are best handled outside of NHibernate (although I believe that there are some features in 2.0 that will start to close the gap). Therefore I am not sure if the obtaining the insert SQL that NHibernate will generate will help you.


Top
 Profile  
 
 Post subject: suggestion
PostPosted: Fri Jan 04, 2008 2:25 am 
Expert
Expert

Joined: Mon Nov 26, 2007 2:29 pm
Posts: 443
Look into the reference, section 13.4, especially the first bullet under "Some points to note".

_________________
Gonzalo Díaz


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.