• 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
AddObjectToBothSidesOfRelationshipWithkey
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AddObjectToBothSidesOfRelationshipWithkey


  • Subject: AddObjectToBothSidesOfRelationshipWithkey
  • From: Frank Stock <email@hidden>
  • Date: Thu, 19 Apr 2007 13:20:08 +0200

Hi,


When  I do this:


bpObject = new BlockProperty();
ec.insertObject(bpObject);
bpObject.setValue(value);
bpObject.addObjectToBothSidesOfRelationshipWithKey(bObject,"block");
bpObject.addObjectToBothSidesOfRelationshipWithKey(pObject,"property");

This will take 90 seconds to complete (will all the rest of the code)

I can see in the debugger that every time I do a AddObjectToBothSidesOfRelationshipWithkey WO will perform a select-statement, 
the relations have a lot of records (>2000). I have to to that a lot of time and all I need is just to make a relation between the objects.
Why is WO performing a select every time and can I avoid that?
If I just do : 
bpObject = new BlockProperty();
ec.insertObject(bpObject);
bpObject.setValue(value);
bObject.addToBlockProperty(bpObject);
pObject.addToBlockProperty(bpObject);
This will take 5 seconds to complete (will all the rest of the code)



Thanks,
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

  • Prev by Date: Re: Off-Topic - What GUI designer?
  • Next by Date: Re: AddObjectToBothSidesOfRelationshipWithkey
  • Previous by thread: (solved) Re: Fetch objects: Error in MYSQL or WO
  • Next by thread: Re: AddObjectToBothSidesOfRelationshipWithkey
  • Index(es):
    • Date
    • Thread