• 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: refresh an enterprise object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: refresh an enterprise object


  • Subject: Re: refresh an enterprise object
  • From: Nathan Dumar <email@hidden>
  • Date: Mon, 21 Jun 2004 21:58:40 -0400

I think aProduct is an EO. Are you sure addObjectToBothSidesOfRelationshipWithKey is a method in an EO? I haven't needed to use it yet, so I don't know much about it.

Because he said, "although data is inserted but the relationship is not 'declared' at this time," I thought he already had the objects, and just needed to establish the relationship. Which to me would be the initial setup in EOModeler or hooking the objects together in code -- either would prevent getting across the relationship. ... I may have misunderstood Goh's question, though.

Nathan



On Jun 21, 2004, at 7:26 PM, Greg Hulands wrote:

shouldn't it be

aProduct.addObjectToBothSidesOfRelationshipWithKey(aStatusObject, "status") ???


On 22/06/2004, at 9:07 AM, Nathan Dumar wrote:

If the relationship is set up correctly, you should be doing something like:

// assuming a to-1
aProduct.setStatus(aStatusObject);

and if it's reciprocal,

// assuming a to-many
aStatusObject.setProducts(aStatusObject.products().arrayByAddingObject (aProduct));


You shouldn't be setting the key yourself. Let WO figure that stuff out -- just tell it which objects are related.

You won't be able to traverse a relationship that you have not yet defined. Use EOModeler first to set everything up. After that, the Java will work.

Nathan
_______________________________________________
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: refresh an enterprise object
      • From: Art Isbell <email@hidden>
References: 
 >refresh an enterprise object (From: Goh Keng Boon <email@hidden>)
 >Re: refresh an enterprise object (From: Nathan Dumar <email@hidden>)

  • Prev by Date: Re: Off Topic : WWDC Birds of Feather
  • Next by Date: Re: Off Topic : WWDC Birds of Feather
  • Previous by thread: Re: refresh an enterprise object
  • Next by thread: Re: refresh an enterprise object
  • Index(es):
    • Date
    • Thread