Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 90279 invoked from network); 1 Nov 2007 16:49:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2007 16:49:15 -0000 Received: (qmail 18017 invoked by uid 500); 1 Nov 2007 16:37:47 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 18007 invoked by uid 500); 1 Nov 2007 16:37:47 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 17995 invoked by uid 99); 1 Nov 2007 16:37:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 09:37:46 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of larry.meadors@gmail.com designates 66.249.92.174 as permitted sender) Received: from [66.249.92.174] (HELO ug-out-1314.google.com) (66.249.92.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 16:37:50 +0000 Received: by ug-out-1314.google.com with SMTP id h2so560907ugf for ; Thu, 01 Nov 2007 09:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=0PWf68Esm7F46LLzN/5gxIAztsAnX7DAGNG3PqQ3gZM=; b=T0ZpwBTdhdROdGLdESO/3P6xTNGGGCAWOVqzAA5Mb8Bt2lE333UmdX0S4uRFcN7nit7s4KD0NElIFM4bHjZPmCV1jan6kPCIj+/vhC+xZsRio/Rvqk121ELyer+tTJP+uSxEdeRjklNB1vl07v1ZLXKeS/BryKIifUXqDV1LBKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=qBFUnGksDUM4t2foRBDH6eyERQoP3xcZ0Yx4iP9FDf7PODXmYMF35Cc1SLhLLyKy2pKYJ+EWEZQFE91HNZPFpDXfxqwXvE3WxqHUH56pABJF761/hZsiYyVq31gj0lvmvEP62DuQha9hx8bectM+l5eiCVm55wkeZ9B2gvgegCA= Received: by 10.67.196.4 with SMTP id y4mr1108522ugp.1193935048950; Thu, 01 Nov 2007 09:37:28 -0700 (PDT) Received: by 10.67.93.8 with HTTP; Thu, 1 Nov 2007 09:37:28 -0700 (PDT) Message-ID: Date: Thu, 1 Nov 2007 10:37:28 -0600 From: "Larry Meadors" Reply-To: lmeadors@apache.org Sender: larry.meadors@gmail.com To: user-java@ibatis.apache.org Subject: Re: Problem with insertKey In-Reply-To: <20071101154754.1DE0772494F@athena.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <002c01c81c95$238a4c30$0301a8c0@VAIOSZ330> <20071101154754.1DE0772494F@athena.apache.org> X-Google-Sender-Auth: 6f9ef16474199996 X-Virus-Checked: Checked by ClamAV on apache.org Try SELECT obituary_seq.NEXTVAL AS id FROM dual instead (id, not value). Larry On 11/1/07, Odelya Glick wrote: > Well, > > I changed it, but it always puts value 0. > > The sequence is declared like this: > > CREATE SEQUENCE obituary_seq > INCREMENT BY 3 > START WITH 100 > NOMAXVALUE > MINVALUE 100 > NOCYCLE > CACHE 20 > NOORDER > > What could be the problem? > > Many thanks, > > Odelya > > > -----Original Message----- > From: Jean-Francois Poilpret [mailto:jfpoilpret@yahoo.fr] > Sent: Thursday, November 01, 2007 4:40 PM > To: user-java@ibatis.apache.org > Subject: RE: Problem with insertKey > > An Oracle sequence cannot map to a String, so your condolence class should > have the following properties: > int id; (or long) > String status; > > Cheers > > Jean-Francois > > -----Original Message----- > From: Odelya Glick [mailto:odelya@jpost.com] > Sent: Friday, November 02, 2007 9:21 AM > To: user-java@ibatis.apache.org > Subject: Problem with insertKey > > > Hi, > > I am trying to receive primary key with: > > > SELECT obituary_seq.NEXTVAL AS value FROM dual > > INSERT INTO CONDOLENCE(ID, STATUS) > VALUES(#id#,#status#) > > > The condolence class has 2 properties: > String id; > String status; > > But it always inserts a record with the right status value, but id value is > always null!! > > Why? > > Thanks > Odelya > web-programmer > 050-2052075 > > > > > > > > > **************************************************************************** > ******** > This footnote confirms that this email message has been scanned by > PineApp Mail-SeCure for the presence of malicious code, vandals & computer > viruses. > **************************************************************************** > ******** > > > > >