Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 51696 invoked from network); 13 May 2003 10:40:28 -0000 Received: from vgate1.alles.or.jp (210.231.151.133) by daedalus.apache.org with SMTP; 13 May 2003 10:40:28 -0000 Received: from [172.17.1.87] (tokyo-gw.alles.or.jp [210.231.143.251:25]) by vgate1.alles.or.jp (Postfix) with ESMTP id 8E6B2AB4D9 for ; Tue, 13 May 2003 19:40:27 +0900 (JST) Date: Tue, 13 May 2003 19:40:27 +0900 From: Tak Fujimoto To: torque-user@db.apache.org Subject: Unable to insert data into a table with foreign keys Message-Id: <20030513192744.3B43.T-FUJIMOTO@beingcorp.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.05.11 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I am unable insert data into a table which has three foreign references. This is the part of project-schema.xml which describes the table I am having a trouble with. **************************************************************************************
--------------------------------------------------------
--------------------------------------------------------
--------------------------------------------------------
************************************************************************************** Now, this is a part of the source which I use Torque with struts. public ActionForward execute ( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { Integer memberId = (Integer)session.getAttribute("memberId"); MainForm mainForm = (MainForm)form; Member member = new Member(); member.setMemberId(memberId.intValue()); Inquiry inquiry = new Inquiry(); inquiry.setInquiryId(mainForm.getFormInquiryId()); Supportresult supportresult = new Supportresult(); supportresult.setSupportresultId(mainForm.getFormSupportresultId()); Telsupport newTelsupport = new Telsupport(); newTelsupport.setMemberId(member.getMemberId()); newTelsupport.setDate(sqlDate); newTelsupport.setTime(sqlTime); newTelsupport.setCustomerNum( mainForm.getFormCustomerNum()); newTelsupport.setInquiryId(inquiry.getInquiryId()); newTelsupport.setSupportresultId(supportresult.getSupportresultId()); newTelsupport.setTelsupport( mainForm.getFormTelsupport()); newTelsupport.save(); return (mapping.findForward("success")); } ************************************************************************************** [setup] jakarta-struts-1.1-b3 jakarta-tomcat-4.0.6 torque-3.0 Red Hat Linux release 7.1 (Seawolf) apache_1.3.26 mod_jk-1.3-noeapi.so I refered to http://db.apache.org/torque/tutorial/step4.html and I am trying to inserting the foreign-keys manually. Please give me any advice, suggestion on what I should do if you have time.