Hi All,

I have a flattened many to many relationship between two table Group and Publication, called AssociatedWebsites. Now when I call

thePublication.addObjectToBothSidesOfRelationshipWithKey (aGroup,"associatedWebsiteDisplays");

or

aGroup.addObjectToBothSidesOfRelationshipWithKey (thePublication,"associatedWebsiteDisplays");

and watch the SQL it its loading all of the objects currently related between the two. ie. whe I have SQL debugging turned on I see the following SQL straight after either of the previous lines of code ( I of course put in the ... etc etc ) :

14:40:27,552 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln) - === Begin Internal Transaction 14:40:27,553 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln) - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn $OracleExpression: "SELECT t0.category_for_other, t0.chapter_title, etc etc .... FROM PUB t0, ASS_WEB_DISP T1, GRP T2 WHERE T2.grp = ? AND t0.pub = T1.pub AND T1.grp = T2.grp" withBindings: 1:30(groupID)> 14:40:34,648 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln) - 17481 row(s) processed 14:40:34,650 DEBUG [WorkerThread7] (Log.NSLogDebug:1546 appendln) - === Commit Internal Transaction

Is this standard behaviour for flattened relationships ? Is there any way to stop this from happening ? Do I need to model the relationships differently ? I don't want to have to load all 17,000 just to add an extra one.

Thanks

Owen McKerrow
WebMaster, emlab
Ph : +61 02 4221 5517
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "As of tomorrow, employees will only be able to access the building using individual security cards. Pictures will be taken next Wednesday employees will receive their cards in two weeks."
- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to