Re: Avoiding duplicate records

2008-01-22 Thread Chuck Hill
On Jan 15, 2008, at 7:19 AM, Mike Schrag wrote: 1) Fo a fetch request to get the contacts with the emails of the 100 contacts batch (ie, blablabla where email = email1 or email = email2 or email = email3 ...). 2) Remove duplicates in memory using a fast method, like putting the stuff in

Re: Avoiding duplicate records

2008-01-16 Thread Mike Schrag
I have the same situation in my database: Java checks to see weither the email address is already in use; if it is, the user gets a message: "Sorry; this email address is already in use in our database ... please try again." Up to the user then. ... until you have two instances, and two user

Re: Avoiding duplicate records

2008-01-16 Thread WILLIAM GARNETT
Hello; I completely agree with Dave's suggestion. I have the same situation in my database: Java checks to see weither the email address is already in use; if it is, the user gets a message: "Sorry; this email address is already in use in our database ... please try again." Up to the user then

Re: Avoiding duplicate records

2008-01-15 Thread Miguel Arroz
Hi! Well, on my PowerBook G4 1.67 Ghz, not yet with conflicts: 1050 records saved one by one: 14 secs 1050 records saved in 50 record batches: 6 secs 1050 records saved in 500 record batches: 5 segundos 1 records saved in 50 record batches: 31 secs 1 records saved in 500 reco

Re: Avoiding duplicate records

2008-01-15 Thread David Avendasora
Oh sure, bring scalability into it... ;) But that's why I was also suggesting it be flagged as a potential duplicate in _this_ situation. I don't think that you can really depend upon email addresses as being unique between two people. Now, he did always say "contacts" in the original email

Re: Avoiding duplicate records

2008-01-15 Thread Miguel Arroz
Hi! Keep cool you guys! :) This is not a "regular" contact list. In this case, it really doesn't make any sense to have more than one email address in each contact list. :) Yours Miguel Arroz On 2008/01/15, at 16:08, Mike Schrag wrote: I think this is a case of something seeming u

Re: Avoiding duplicate records

2008-01-15 Thread Daniele Corti
2008/1/15, Miguel Arroz <[EMAIL PROTECTED]>: > > Hi! > > On 2008/01/15, at 15:21, Daniele Corti wrote: > > > One more thing whitch db you use? > >PostgreSQL. Well in any case, I think you should try to manipulate the contacs strings before try to insert them. You didn't say where the datas co

Re: Avoiding duplicate records

2008-01-15 Thread Daniele Corti
2008/1/15, Mike Schrag <[EMAIL PROTECTED]>: > > > the same key into an in-set in the QualifierSupport. > > > > I've never noticed it... > The best magic never is ;) Wonder... Because magic is reality!!! ms > > ___ > Do not post admin requests to the li

Re: Avoiding duplicate records

2008-01-15 Thread Mike Schrag
I think this is a case of something seeming unique, but really isn't. You can have a business rule that says they don't want duplicates, but hard-coding business rules into the DB can lead to problems in the future. Use Java to enforce the business logic, not the DB. Initiate religious arg

Re: Avoiding duplicate records

2008-01-15 Thread Mike Schrag
the same key into an in-set in the QualifierSupport. I've never noticed it... The best magic never is ;) ms ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsub

Re: Avoiding duplicate records

2008-01-15 Thread Daniele Corti
2008/1/15, Mike Schrag <[EMAIL PROTECTED]>: > > > sorry, but this is very ugly... you should use something like > > InSetQualifier (e.g. "WHERE a IN (1,2,3...") > For what it's worth, Wonder automatically turns sequences of or's of > the same key into an in-set in the QualifierSupport. I've never

Re: Avoiding duplicate records

2008-01-15 Thread David Avendasora
Is this really true? I can think of lots of situations where you might have multiple contacts with the same email address. For example, [EMAIL PROTECTED] could be a shared mailbox for several sales reps who don't yet have their own accounts (yes, it still happens in this day and age...) or

Re: Avoiding duplicate records

2008-01-15 Thread Miguel Arroz
Hi! On 2008/01/15, at 15:21, Daniele Corti wrote: One more thing whitch db you use? PostgreSQL. Yours Miguel Arroz Miguel Arroz http://www.terminalapp.net http://www.ipragma.com smime.p7s Description: S/MIME cryptographic signature ___

Re: Avoiding duplicate records

2008-01-15 Thread Mike Schrag
sorry, but this is very ugly... you should use something like InSetQualifier (e.g. "WHERE a IN (1,2,3...") For what it's worth, Wonder automatically turns sequences of or's of the same key into an in-set in the QualifierSupport. ms ___ Do not post

Re: Avoiding duplicate records

2008-01-15 Thread Daniele Corti
2008/1/15, Miguel Arroz <[EMAIL PROTECTED]>: > > Hi! > >I'm thinking how to approach the following problem, and I would > like to know opinions about this, because I may be overcomplicating > this, as I often do. > >I need to manage contact lists. A contact is an object with an > email, fir

Re: Avoiding duplicate records

2008-01-15 Thread Mike Schrag
1) Fo a fetch request to get the contacts with the emails of the 100 contacts batch (ie, blablabla where email = email1 or email = email2 or email = email3 ...). 2) Remove duplicates in memory using a fast method, like putting the stuff in NSSets or whatever. 3) Try to save again. Of cours

Avoiding duplicate records

2008-01-15 Thread Miguel Arroz
Hi! I'm thinking how to approach the following problem, and I would like to know opinions about this, because I may be overcomplicating this, as I often do. I need to manage contact lists. A contact is an object with an email, first name, last name, and some flags. The important thing