Return-Path: Delivered-To: apmail-db-ddlutils-dev-archive@www.apache.org Received: (qmail 78539 invoked from network); 15 Mar 2007 16:02:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Mar 2007 16:02:30 -0000 Received: (qmail 95065 invoked by uid 500); 15 Mar 2007 16:02:38 -0000 Delivered-To: apmail-db-ddlutils-dev-archive@db.apache.org Received: (qmail 95046 invoked by uid 500); 15 Mar 2007 16:02:38 -0000 Mailing-List: contact ddlutils-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-dev@db.apache.org Delivered-To: mailing list ddlutils-dev@db.apache.org Received: (qmail 95035 invoked by uid 99); 15 Mar 2007 16:02:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2007 09:02:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2007 09:02:29 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A7EF871407D for ; Thu, 15 Mar 2007 09:02:09 -0700 (PDT) Message-ID: <26535824.1173974529685.JavaMail.jira@brutus> Date: Thu, 15 Mar 2007 09:02:09 -0700 (PDT) From: "Thomas Dudziak (JIRA)" To: ddlutils-dev@db.apache.org Subject: [jira] Commented: (DDLUTILS-163) Platform Update Behavor should not set to NULL not defined properties of a DynaBean In-Reply-To: <191489.1173715509458.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DDLUTILS-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481199 ] Thomas Dudziak commented on DDLUTILS-163: ----------------------------------------- The problem is that in the extreme case (which properties are undefined varies from dyna bean to dyna bean) for each bean a new prepared statement has to be created which in turn renders batch mode useless and means a huge performance impact. > Platform Update Behavor should not set to NULL not defined properties of a DynaBean > ------------------------------------------------------------------------------------ > > Key: DDLUTILS-163 > URL: https://issues.apache.org/jira/browse/DDLUTILS-163 > Project: DdlUtils > Issue Type: Improvement > Components: Core (No specific database) > Environment: All environements > Reporter: Lucas Moreno > Assigned To: Thomas Dudziak > > The default update behavor implemented in PlatformImpl takes a DynaBean as parameter and creates a UPDATE statement for all the columns of the table nor only those ones defined as properties of the bean. > The result is that not specified properties of the bean are set to NULL which may no be the desired behavor. > An update using a DynaBean should only update columns wich have a value (also null) for a given property. > As I see, the update method should: > - Check that all the primary keys are defined in the bean > - Prepare a SQL Update query only with the values specified in the bean > - Execute the update -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.