• 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
Re: Saving entities problem [SOLVED] {DONE -- FOR NOW}
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving entities problem [SOLVED] {DONE -- FOR NOW}


  • Subject: Re: Saving entities problem [SOLVED] {DONE -- FOR NOW}
  • From: Jevon Hills <email@hidden>
  • Date: Wed, 6 Aug 2003 08:33:50 -0600

The issue I seem to be experiencing is that My join is not between 2 tables, but between 3 tables with all three FKs, being Primary.

I have a working solution for now, but my guess on why this would not work is that using addToBothSidesOfRelationship only takes one parameter and would therefor fail as my join entity requires all three items at once.



This hypothesis could be wrong but I believe what is happening is:
aUsers.addObjectToBothSidesOfRelationshipWithKey(mlp, "FLT_APPLICATIONS");
//creates the first row in the join which will fail as there is no permission associated with the User and the Application

aUsers.addObjectToBothSidesOfRelationshipWithKey(canUse,"FLT_PERMISSION" );
//creates another row in the join which will fail as there is no application associated with the User and the permission


I'm looking into extending the KeyValueCoding classes to create a method which will take 2 objects and 2 keys and then essentially create the relationships between all 3 entities.
//Method Coming Soon (I Hope)
aUsers.addObjectsToAllSidesOfRelationshipsWithKeys(mlp, "FLT_APPLICATIONS", canUse,"FLT_PERMISSION");



For now what I have done is instantiated my 'Join' obj and set the the objects to it:


				USERAPPLICATIONPERMISSION uap = newUserApplicationPermission();
				uap.takeValueForKey(at, "users");
				uap.takeValueForKey(mlp, "applications");
				uap.takeValueForKey(canUse, "permission");


Thanx for everyone's help on this. In a while (a day or two)I'm likely to have question on and where to find info on KeyValueCoding



Jevon K. Hills Developer - Zymeta Media Promotion Systems _______________________________________________ webobjects-dev mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Saving entities problem [SOLVED] {DONE -- FOR NOW}
      • From: Chuck Hill <email@hidden>
References: 
 >Re: Saving entities problem [SOLVED] (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: WebObjects Builder keeps crashing... solution
  • Next by Date: Re: Saving entities problem [SOLVED] {DONE -- FOR NOW}
  • Previous by thread: Re: Saving entities problem [SOLVED]
  • Next by thread: Re: Saving entities problem [SOLVED] {DONE -- FOR NOW}
  • Index(es):
    • Date
    • Thread