• 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: Setting a Default toOne Relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting a Default toOne Relationship


  • Subject: Re: Setting a Default toOne Relationship
  • From: David Avendasora <email@hidden>
  • Date: Tue, 30 May 2006 15:54:31 +0100


On May 25, 2006, at 5:21 PM, Chuck Hill wrote:

That is what I would expect. awakeFromInsertion should be processed client side.

Not according to the documentation! It says: <snip> Add this code in the server-side Student.java file:

public void awakeFromInsertion(EOEditingContext context) {
	super.awakeFromInsertion(context);
	if (gpa() == null) {
	setGpa(new BigDecimal("0"));
	}
</snip>

But THAT doesn't work. It works fine on the client-side where YOU say it should so fine, the documentation is wrong. Now, I need to do a fetch (to get the related object) as part of awakeFromInsertion() and that won't work on the client-side. It never executes. The DB never sees a request. Any ideas?

I've tried using invokeRemoteMethod() and having the server-side class do the fetch and set the relationship, but apparently when you use the invokeRemoteMethod() method, WO actually validates and saves the instance to the DB, which it can't because none of the required values / mandatory relationships aren't set yet - which is what I'm trying to do!!!! Ahg!

Does anyone have any idea on how to set a default relationship in Java Client when the related object already is in the DB and needs to be looked-up? Nothing seems to work for me.

Dave


_______________________________________________ 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
References: 
 >Re: Setting a Default toOne Relationship (From: David Avendasora <email@hidden>)
 >Re: Setting a Default toOne Relationship (From: Chuck Hill <email@hidden>)
 >Re: Setting a Default toOne Relationship (From: David Avendasora <email@hidden>)
 >Re: Setting a Default toOne Relationship (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: newbie question regarding WOPopUp
  • Next by Date: Re: newbie question regarding WOPopUp
  • Previous by thread: Re: Setting a Default toOne Relationship
  • Next by thread: PK Generation in MySQL
  • Index(es):
    • Date
    • Thread