• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Delete statement
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Delete statement


  • Subject: Delete statement
  • From: Frank Stock <email@hidden>
  • Date: Wed, 4 Apr 2007 18:45:42 +0200

Hi,

I use SOAP-calls to WO and I get strange effects in the following routine:

public void deleteWebtextValue (String webtext, String language) {


EOEditingContext ec = new EOEditingContext();
EOQualifier aQual;
NSMutableArray qbind;
EOFetchSpecification fs;


LanguageWebtext lwObject;
qbind=new NSMutableArray();
qbind.addObject(webtext);
qbind.addObject(language);
aQual = EOQualifier.qualifierWithQualifierFormat("(webtext.webtext=%@) and (language.language=%@)",qbind);
fs = new EOFetchSpecification("LanguageWebtext",aQual,null);
NSArray arLanguageWebtext = ec.objectsWithFetchSpecification(fs);
// should only be 1
for (int i=0;i< arLanguageWebtext.count();i++) {
lwObject = (LanguageWebtext)arLanguageWebtext.objectAtIndex(i);
ec.deleteObject(lwObject);
}
ec.saveChanges();
}

Most of the time this results in a delete-statement:
delete from languagewebtext where languagewebtext_id=8788;

but sometimes I get a (strange) update-statement:

update languagewebtext set language_id = NULL, webtext_id = NULL where languagewebtext_id=8898;
Both can't be NULL;
This results in currupting the database!

I don't understand that!


Thanks for helping,
Frank Stock
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Delete statement
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: WOPopUpButton bug 5.3 DST : SOLVED
  • Next by Date: Re: Delete statement
  • Previous by thread: Re: WOForm Question
  • Next by thread: Re: Delete statement
  • Index(es):
    • Date
    • Thread