Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 94021 invoked from network); 2 Jan 2007 22:32:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jan 2007 22:32:48 -0000 Received: (qmail 37701 invoked by uid 500); 2 Jan 2007 22:32:55 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 37683 invoked by uid 500); 2 Jan 2007 22:32:54 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 37674 invoked by uid 99); 2 Jan 2007 22:32:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jan 2007 14:32:54 -0800 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; Tue, 02 Jan 2007 14:32:47 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8E35F7142D3 for ; Tue, 2 Jan 2007 14:32:27 -0800 (PST) Message-ID: <13950414.1167777147557.JavaMail.jira@brutus> Date: Tue, 2 Jan 2007 14:32:27 -0800 (PST) From: "Patrick Linskey (JIRA)" To: open-jpa-dev@incubator.apache.org Subject: [jira] Commented: (OPENJPA-94) Allow MappingTool and persistence.xml to support drop-create for database schema In-Reply-To: <8812029.1167773307829.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 [ http://issues.apache.org/jira/browse/OPENJPA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461857 ] Patrick Linskey commented on OPENJPA-94: ---------------------------------------- One downside of dropping and re-creating schemas is the latency of the operation. I think that it'd be more useful to have an option to automatically delete all records from all mapped tables. This option could potentially also work lazily if a full class list is not available up-front -- OpenJPA could issue a delete statement when a new ClassMapping is first initialized. > Allow MappingTool and persistence.xml to support drop-create for database schema > -------------------------------------------------------------------------------- > > Key: OPENJPA-94 > URL: http://issues.apache.org/jira/browse/OPENJPA-94 > Project: OpenJPA > Issue Type: New Feature > Reporter: Shay Banon > > Currently, in the persistence context, one can define: > > Which causes OpenJPA to build the database schema based on the mapping defined. Currently, there is no way to define it to drop tables if they exists before creating the database schema. This is very useful for tests that drop (if exists) and creates new tables for each test. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira