Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 29010 invoked from network); 15 Jan 2007 10:51:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jan 2007 10:51:14 -0000 Received: (qmail 80918 invoked by uid 500); 15 Jan 2007 10:51:20 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 80900 invoked by uid 500); 15 Jan 2007 10:51:20 -0000 Mailing-List: contact cayenne-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-user@incubator.apache.org Delivered-To: mailing list cayenne-user@incubator.apache.org Received: (qmail 80891 invoked by uid 99); 15 Jan 2007 10:51:20 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jan 2007 02:51:20 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [193.108.184.25] (HELO mail.gi-de.com) (193.108.184.25) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jan 2007 02:51:11 -0800 Received: from notessmtp1.domino.intern [10.4.4.49] by mail.gi-de.com id 9Z2LCTZF outgoing id 9Z2LCTZF; 15 Jan 2007 11:50:48 +0100 Subject: Problem writing java.lang.Long into database To: cayenne-user@incubator.apache.org X-Mailer: Lotus Notes Release 7.0.1 January 17, 2006 Message-ID: From: Florian.Eska@gi-de.com Date: Mon, 15 Jan 2007 11:50:51 +0100 X-MIMETrack: Serialize by Router on NOTESSMTP1/SRV/GuD(Release 7.0.2|September 26, 2006) at 15.01.2007 11:50:47 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org Hi, I have a problem with writing a java.lang.Long into our database. Example: I have a value in the database greater than java.lang.Integer.MAX_VALUE, example 9000000020. I can read the value correct from the database. I add 1 to the value (only for the example here), so we have the new value 9000000021 in the Java data object. After a commit we have the value "410065439" in the database. This is exactl y the conversion: long lo = 9000000021L; int val = (int) lo;" The failure occurs during the write to the database. I think I have a small mapping problem and could not find the correct way to map java.lang.Long to our database. Sorry if a descriptin exist in the documentation, but I didn't found it Mapping File .... .... Environment: Oracle 10 g cayenne 1.2 jdk 1.4.2.10 Later I need the same functionality in DB2. Thanks Florian