X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.22.2a (ClamAV engine v0.102.2) From: "D Tim Cummings" Received: from mail.triptera.com.au ([159.65.15.17] verified) by post.selbstdenker.com (CommuniGate Pro SMTP 6.3.7) with ESMTPS id 26697453 for webobjects-dev@wocommunity.org; Wed, 27 Oct 2021 12:07:11 +0200 Received-SPF: pass receiver=post.selbstdenker.com; client-ip=159.65.15.17; envelope-from=tim@triptera.com.au Received: from localhost (localhost [127.0.0.1]) by mail.triptera.com.au (Postfix) with ESMTP id 8E0B818318C for ; Wed, 27 Oct 2021 10:06:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.triptera.com.au Received: from mail.triptera.com.au ([127.0.0.1]) by localhost (mail.triptera.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CrAAP4CpBPb9 for ; Wed, 27 Oct 2021 10:06:44 +0000 (UTC) Message-ID: <5211ea43-4e63-716e-6366-1cb402bdf239@triptera.com.au> DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=triptera.com.au; s=201903; t=1635329204; bh=qhanIcOyrlwJheKWxRAM9JfhrmVY4f9dKPpMSoU4MtU=; h=Date:To:References:From:Subject:In-Reply-To:From; b=GS5FXlZMGHq/Uoeei3E+2HPlXjCPj0ZD9bGfB4SwzD2cchMl0lMh/3S+SSvrWYBOy gQFYA7F8ebpPyFnDwjykjgGIlOjRBpB9gjzBWghZ8t2mMpFvvAOHI2pt1DEZQNoULT v1n0e728atJ+CS3ZxAqvHmi0fg9JO2FtgPfxD7U80jAV5BFNlxY+tIjDMsEWjQu41d uoGR/0Gcczd70t/iB/+ETkPYlSZH9bi7dfJQc0UD7nZ8PFliCMev81J0TEfjbon7N3 y3QgZZpGHuPfOpeTihAPRAvBuUcGM6yCaqV33pgaaiYyUe8d8L7gp15XgyosNsybSV ekOpkhS4GoFRg== Date: Wed, 27 Oct 2021 20:06:42 +1000 MIME-Version: 1.0 Content-Language: en-AU To: WebObjects & WOnder Development References: Subject: Re: [WO-DEV] Re: Postgresql jdbc driver upgrade not recommended In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Postgresql data type : Numeric(38,4) allows null Java data type: BigDecimal EOModel using prototype: currencyAmount When number is first retrieved from database it has precision 10 scale 4 eg 150000.0000 I click the edit button which puts the number in a textfield which has numberformat "$#,##0; ($#,##0)" and it displays as $150,000 I click save button. Number in EO is now 150000 with precision 6 and scale 0 I run ec().saveChanges() where ec() is my editingContext. Number in EO is still 150000 with precision 6 and scale 0 I repeat the procedure "edit / save" several times and randomly the number in EO eventually becomes 15 with precision 2 and scale 0. If it happens before the saveChanges() then the new number gets saved to the database. However it can happen after the save in which case my app sees the small number but it doesn't get saved to database if I shutdown the app at that point and start it up again. It looks like a problem with my app except that it only started happening with the new JDBC driver and reverting the JDBC driver removes the problem. Tim On 27/10/21 18:48, Hugi Thordarson wrote: > Hi Tim, > out of curiosity, what's the data type of the number that's getting truncated? (both the DB and java/model side) > > - hugi > > >> On 27 Oct 2021, at 04:53, D Tim Cummings wrote: >> >> I just upgraded my postgresql jdbc driver from 42.2.23 to 42.3.0 and suddenly any number returned from the database that ended in four zeros was having the zeros trimmed. >> >> For example >> >> 150000 became 15 >> >> This did not affect numbers ending in three zeros >> >> 151000 stayed as 151000 >> >> I am still looking for the cause but rolling back to 42.2.23 fixed the problem. Problem was reproducible on Postgresql 10.18 on Ubuntu and Postgresql 13.3 on Mac. >> >> I am using Wonder 7.2 with Postgresql plugin. My project is defined using the maven structure. I was using the postgresql jdbc driver in my pom.xml with >> >> >> org.postgresql >> postgresql >> 42.2.23 >> >> >> Hope this helps >> >> Tim >> >> >> > > ############################################################# > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > To switch to the INDEX mode, E-mail to > Send administrative queries to >