HI,
I did test it with addTo<relationsShipName> and that just gives me
the same result!
Thanks,
Frank Stock
Op 19-apr-07, om 13:30 heeft Shravan Kumar.M het volgende geschreven:
Hello Frank,
When there is a one-to-many or many-to-many it is advised not use
addObjectToBothSidesOfRelationshipWithKey instead use the
individual addTo<relationShipName>() methods. When we use
addObjectToBothSidesOfRelationshipWithKey , it tries to fault the
objects in the relationship and that is what you see "Select
statements". Better go with addTo<relationShipName>() methods in
such cases.
Thanks & Rgds,
Shravan Kumar.M
"Let us learn from the past to profit by the present,and from the
present to live better in the future."
--William WordsWorth
---------------------------------------------------------------
On 19-Apr-07, at 4:50 PM, [EMAIL PROTECTED]
wrote:
From: Frank Stock <[EMAIL PROTECTED]>
Date: 19 April 2007 4:50:08 PM GMT+05:30
To: webobjects-dev@lists.apple.com
Subject: AddObjectToBothSidesOfRelationshipWithkey
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
_______________________________________________
Webobjects-dev mailing list
Webobjects-dev@lists.apple.com
http://lists.apple.com/mailman/listinfo/webobjects-dev
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]