Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 78755 invoked from network); 20 Jul 2007 18:51:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jul 2007 18:51:46 -0000 Received: (qmail 67287 invoked by uid 500); 20 Jul 2007 18:51:47 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 67035 invoked by uid 500); 20 Jul 2007 18:51:47 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 67026 invoked by uid 99); 20 Jul 2007 18:51:46 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2007 11:51:46 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 20 Jul 2007 11:51:44 -0700 Received: (qmail 17729 invoked from network); 20 Jul 2007 18:51:24 -0000 Received: from unknown (HELO ?????o??IPv6:::1?) (127.0.0.1) by localhost with SMTP; 20 Jul 2007 18:51:24 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <7DC55C0B-6624-4A2D-B3B9-EF56B0562E6F@objectstyle.org> Content-Transfer-Encoding: quoted-printable From: Andrus Adamchik Subject: Re: On the fly reengineering of database schema Date: Fri, 20 Jul 2007 21:51:21 +0300 To: user@cayenne.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org > Is there any reason, in principle, why we couldn't read that info > during startup of the application? IOW, reengineering on the fly. No reason - you can totally do it. Cayenne runtime mapping is =20 completely dynamic. It's not like we would need to re-enhance Java =20 bytecode or anything :-) Andrus On Jul 20, 2007, at 9:42 PM, =D8yvind Harboe wrote: > Currently our Cayenne app has the database field size and types stored > in the configuration files that ship with the application. They were > generated in the Cayenne modeler. > > Is there any reason, in principle, why we couldn't read that info > during startup of the application? IOW, reengineering on the fly. > > - It would allow database maintainers to adjust field sizes without us > updating Cayenne. > We have a lot of variants of the database schema in the field and > changing size of a NVARCHAR or changing an NVARCHAR to a CLOB would > be typical operations. > - Adding a field to a database table could be done from the =20 > database GUI > - We would be able to cope easily with the absence or presence of > optional table fields > > The Cayenne modeler would still be useful to choose Java > representation of the fields regardless of their type(CLOB, NVARCHAR, > CHAR, etc.). > > We have some database adapters that don't do robust reengineering > (FoxBase, MS Access, shudder!), but presumably we could > programatically adapt the Cayenne database schema for those/stick with > a default one which we do today. > > --=20 > =D8yvind Harboe > http://www.zylin.com - eCos ARM & FPGA developer kit >