RE: Transactions , Primary Keys

2007-09-22 Thread Philip Copeland
Hi, I was planning to use a similar approach - but was thinking of using a temporary table - but you are right - if I can do this via a map it could work - as long as the number of objects in the import set is reasonable. Did you have an issue committing every "several thousand records". What wou

Re: Transactions , Primary Keys

2007-09-22 Thread Aristedes Maniatis
On 23/09/2007, at 8:26 AM, Philip Copeland wrote: The main problem I'm facing is that objects don't get written to the database (nor Primary Keys generated) unless we commit our transaction. What I'm wishing for is a mode where all changes are made to the underlying database - but not commit

Re: Optimize cascade deletes

2007-09-22 Thread Aristedes Maniatis
On 22/09/2007, at 11:41 PM, Giulio Cesare Solaroli wrote: 15 seconds are a lot of time, but they would be bearable. The problem is that I suppose this time will gradually increase with the growth of the number of records to delete. That is still about 1000 times the duration I'd expect this t

Transactions , Primary Keys

2007-09-22 Thread Philip Copeland
Hi, We've used Cayenne extensively over the last 2 years - with great success on many projects. I'm in the process of designing & implementing a generic import/export feature for some of our projects - and its raising some difficult issues that I don't know how to resolve. We're currently

Re: Optimize cascade deletes

2007-09-22 Thread Giulio Cesare Solaroli
Hello Andrus, thank you very much for the pointers; I will start digging them soon. Best regards, Giulio Cesare On 9/22/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > > On Sep 22, 2007, at 4:41 PM, Giulio Cesare Solaroli wrote: > > > >>> The SQL I am expecting Cayenne to generate would look

Re: Optimize cascade deletes

2007-09-22 Thread Andrus Adamchik
On Sep 22, 2007, at 4:41 PM, Giulio Cesare Solaroli wrote: The SQL I am expecting Cayenne to generate would look like this: delete from user_detail where id_user = ; Cayenne 3.0M2 (yet unreleased) supports such functionality via an EJBQL query, but maybe you don't need to do direct DB delet

Re: Optimize cascade deletes

2007-09-22 Thread Giulio Cesare Solaroli
On 9/22/07, Andrus Adamchik <[EMAIL PROTECTED]> wrote: > > On Sep 21, 2007, at 7:45 PM, Giulio Cesare Solaroli wrote: > > > > > [18:09:40] DELETE FROM clipperz.RCRVRS WHERE ID_RCRVRS = ? > > [18:09:40] [batch bind: 968] > > [18:09:40] [batch bind: 875] > > [..] > > [18:09:40] [batch bind: 1177]

Re: Optimize cascade deletes

2007-09-22 Thread Giulio Cesare Solaroli
Hello, On 9/22/07, Michael Gentry <[EMAIL PROTECTED]> wrote: > FWIW: > > I run PostgreSQL on OS X and it is plenty fast enough. The downside > to PostgreSQL on OS X is there isn't an installer, so it is more work > to build and install. If you are Unix-savvy, though, this won't be > much of a pr

Re: Optimize cascade deletes

2007-09-22 Thread Michael Gentry
FWIW: I run PostgreSQL on OS X and it is plenty fast enough. The downside to PostgreSQL on OS X is there isn't an installer, so it is more work to build and install. If you are Unix-savvy, though, this won't be much of a problem. I've used PostgreSQL on Windows, too, which works alright overall

Re: Temp ID issue - Exception

2007-09-22 Thread Andrus Adamchik
A few more questions. Could you provide a more complete stack trace (just include the entire Cayenne part of the stack), as I am wondering where in the Cayenne code the failing query is fired? Does it happen every time when a user request hits the code in question, or is it sporadic? (I a

Re: Optimize cascade deletes

2007-09-22 Thread Andrus Adamchik
On Sep 21, 2007, at 7:45 PM, Giulio Cesare Solaroli wrote: [18:09:40] DELETE FROM clipperz.RCRVRS WHERE ID_RCRVRS = ? [18:09:40] [batch bind: 968] [18:09:40] [batch bind: 875] [..] [18:09:40] [batch bind: 1177] [18:09:40] [batch bind: 2792] [18:11:54] === updated 68 rows. In this case, to