-->
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.  [ 1 post ] 
Author Message
 Post subject: Bulk Insert with Foreign Keys or Associations
PostPosted: Thu Nov 17, 2005 1:32 am 
Newbie

Joined: Thu Nov 17, 2005 1:18 am
Posts: 1
This question concerns rc2 and the brand-new "bulk insert" function. What I need is to insert new entries into a table that has two foreign keys. What I cannot figure out after hours of searching here and elsewhere is how to represent the foreign-key fields in the HQL query. In the config file, here's an example of how one of the keys is defined:

<many-to-one name="employee" column="fk_employee_id" class="Employee" not-null="true" />

But in the INSERT ... SELECT HQL statement, trying to represent that entity in the value list preceding the select statement has been impossible thus far. I've tried: employee, fk_employee_id, employee.id and employee.employeeId with no joy.

I have tracked down what docs exist on this, but the example given did not address this issue.

Thanks for your time,
Steve


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

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.