Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 80546 invoked from network); 4 Apr 2006 08:58:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Apr 2006 08:58:41 -0000 Received: (qmail 60558 invoked by uid 500); 4 Apr 2006 08:58:37 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 60455 invoked by uid 500); 4 Apr 2006 08:58:36 -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 60394 invoked by uid 99); 4 Apr 2006 08:58:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Apr 2006 01:58:36 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [203.15.93.5] (HELO carme.synect.com) (203.15.93.5) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Apr 2006 01:58:34 -0700 Received: from localhost (localhost [127.0.0.1]) by carme.synect.com (Postfix) with ESMTP id A118C31157 for ; Tue, 4 Apr 2006 17:54:36 +0930 (CST) Received: from carme.synect.com ([127.0.0.1]) by localhost (mail2.synect.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11323-05 for ; Tue, 4 Apr 2006 17:54:35 +0930 (CST) Received: from [203.15.93.218] (titan.internal.synect.com [203.15.93.218]) by carme.synect.com (Postfix) with ESMTP id A9514308BE for ; Tue, 4 Apr 2006 17:54:35 +0930 (CST) Message-ID: <44322D43.7090007@synect.com> Date: Tue, 04 Apr 2006 17:54:35 +0930 From: Craig Turner User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051116) X-Accept-Language: en-us, en MIME-Version: 1.0 To: cayenne-user@incubator.apache.org Subject: Seeking to automate generation the cayenne schema Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at synect.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N In short: is there a command-line or API-driven way of creating a cayenne configuration by pointing at an existing schema or is the modeler the only supported approach? Cgen should be OK for generating the classes, but I'm interested in an earlier step - generating the XML configuration itself. -- I'm in the process of writing a framework with cayenne 1.2 as one of the components [1]. It's driven from the command-line. Eg: sf create project name com.base.of.java.package For this paticular operation I'd like to be able to do this: sf create project name com.base.of.java.package jdbc:uri com.db.Driver It's my intention that this should create a project of the supplied name and base backage and generate a cayenne setup based on the supplied url and database driver. Is it straightforward to generate a configuration this way with existing tools? I'm guessing it won't be too difficult to either hack the modeler to do this without user interaction or else generate my own XML based on JDBC inspection, but I'd far prefer to do it through a supported approach if one is available. - C [1] I'm writing it in python. The other main dependencies are tapestry 4 and tomcat. Some readers may notice a passing resemblance to a certain set of perl-based webobjects tools :)