RE: Getting all the ClassMetaDatas

2007-01-02 Thread Shay Banon
d recipient, > and have received this message in error, please immediately return this > by email and then delete it. > >> -Original Message- >> From: Shay Banon [mailto:[EMAIL PROTECTED] >> Sent: Tuesday, January 02, 2007 12:34 AM >> To: open-jpa-dev@incub

RE: Perform automatic drop and create db schema

2007-01-02 Thread Shay Banon
Automatically clean that data without dropping the tables makes even more sense. That would be a really cool feature. Patrick Linskey wrote: > > IMO, a more valuable option would be a way to delete all records in all > mapped tables, rather than doing unnecessary schema interrogation. > > Addi

RE: Perform automatic drop and create db schema

2007-01-02 Thread Shay Banon
I think so as well :) Patrick Linskey wrote: > > I think that Abe and Shay are talking about slightly different features. > > -Patrick > > -- > Patrick Linskey > BEA Systems, Inc. > > ___ > Notice: This email message, tog

RE: Getting all the ClassMetaDatas

2007-01-02 Thread Shay Banon
opyrighted and/or > legally privileged, and is intended solely for the use of the individual > or entity named in this message. If you are not the intended recipient, > and have received this message in error, please immediately return this > by email and then delete it. >

Re: Perform automatic drop and create db schema

2007-01-02 Thread Shay Banon
Just using refresh does not clean up the data in the database (getting Unique constraints violations). Just for kicks I tried SchemaTool.DropTables=true, it did pass the configuration phase, but it still did not cleaned the data/schema. Abe White wrote: > >> Caused by: org.apache.openjpa.lib.u

Re: Perform automatic drop and create db schema

2007-01-02 Thread Shay Banon
The way I usually do things is by starting a transaction, and simply rolling it back when my test finishes (if it wasn't committed/rolled back during the test method). This usually supports 90% of an application integration tests needs. In my case, I have simple tests, I am running them against an

Re: Perform automatic drop and create db schema

2007-01-02 Thread Shay Banon
It is one of the first things I tried, I got this exception: Caused by: org.apache.openjpa.lib.util.ParseException: There was an error while setting up the configuration plugin option "SynchronizeMappings". The plugin was of type "org.apache.openjpa.jdbc.meta.MappingTool". Setter methods for the

[jira] Created: (OPENJPA-94) Allow MappingTool and persistence.xml to support drop-create for database schema

2007-01-02 Thread Shay Banon (JIRA)
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

Re: Perform automatic drop and create db schema

2007-01-02 Thread Shay Banon
> The only other recourse, I think, would be to just manually delete > the database files before running your tests. > > > On Jan 2, 2007, at 3:34 PM, Shay Banon wrote: > >> >> I am trying to figure out how to configure OpenJPA to perform drop >> an

Perform automatic drop and create db schema

2007-01-02 Thread Shay Banon
I am trying to figure out how to configure OpenJPA to perform drop and then create the db schema. I got as far as: Which causes the schema to be created, but does not drop it when the EMF closes (or when a new EMF starts). The main reason I want it for is for simple tests, where each tests wor

Re: Getting all the ClassMetaDatas

2007-01-02 Thread Shay Banon
; > You might want to enable verbose logging and watch the make sure the > class metadatas are registered before you try to get the list from > the repository. > > > > On Jan 1, 2007, at 4:11 PM, Shay Banon wrote: > >> >> Hi, >> >>Fir

RE: Getting all the ClassMetaDatas

2007-01-02 Thread Shay Banon
prietary, copyrighted and/or > legally privileged, and is intended solely for the use of the individual > or entity named in this message. If you are not the intended recipient, > and have received this message in error, please immediately return this > by email and then delete it

RE: Getting all the ClassMetaDatas

2007-01-02 Thread Shay Banon
; -Original Message- >> From: Patrick Linskey >> Sent: Monday, January 01, 2007 5:51 PM >> To: open-jpa-dev@incubator.apache.org >> Subject: RE: Getting all the ClassMetaDatas >> >> > -Original Message- >> > From: Shay Banon [mailto:[EMAIL PR

Getting all the ClassMetaDatas

2007-01-01 Thread Shay Banon
Hi, First, I hope that this is the correct forum for posting questions, so sorry if it isn't. I have an external list of classes that I would like to match against the persistent classes that are defined/identified by OpenJPA. I would really like to get the ClassMetaData for each one, since i