• 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
Flattened Many To Many grabbing all objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flattened Many To Many grabbing all objects


  • Subject: Flattened Many To Many grabbing all objects
  • From: Owen McKerrow <email@hidden>
  • Date: Fri, 18 Jan 2008 14:56:17 +1100

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@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Further Info : Flattened Many To Many grabbing all objects
      • From: Owen McKerrow <email@hidden>
  • Prev by Date: Re: NSTimestamp mapped to DATE for mysql
  • Next by Date: Re: Can't set frameworks with latest nightly
  • Previous by thread: Re: Background Processes - best practice
  • Next by thread: Further Info : Flattened Many To Many grabbing all objects
  • Index(es):
    • Date
    • Thread