• 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: When Is Validation Triggered
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When Is Validation Triggered


  • Subject: Re: When Is Validation Triggered
  • From: Ramsey Gurley <email@hidden>
  • Date: Fri, 03 Jun 2011 13:56:52 -0700


On Jun 3, 2011, at 1:20 PM, Chuck Hill wrote:

On Jun 3, 2011, at 1:17 PM, Kevin Hinkson wrote:
On 3 Jun 2011, at 16:00, Chuck Hill wrote:

There is no need for the first save.  Trust in EOF:

EO1 -> init
EO2 -> init
-> add relationship to EO1
-> save both.

I thought so, but when I had attempted it once before I got nothing. I figured you were right so the caveat is: foreign keys must not be class properties for this to work. Which makes perfect sense. Thanks again.

Correct.  You can expose the PK though that is commonly considered Bad Practice and Undesirable.  Exposing  the FK will cause problems for EOF -- just don't! :-)

Chuck

Okay, this is where Chuck tells me I'm a fool... (^_^)

I've recently decided that this is a good idea:

I can use wonder's javaEnum prototype to create an attribute on table A. To ensure that attribute value is normalized in the database, I model that attribute as the FK in a relationship to table B. Table B has only one column, the PK, which is the same javaEnum.  Now, on table A, I expose the FK enum as a class property, but the relationship to B is NOT a class property (^_^)  So, with this setup, EOF generates my FK constraint to ensure normalized data on table A while making it remain by all appearances as just an enum attribute.

I mention it, because these "clever" hacks of mine usually end up blowing up in my face later on down the road.  (^_^)

Ramsey

 _______________________________________________
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:
    • Re: When Is Validation Triggered
      • From: David Avendasora <email@hidden>
    • Re: When Is Validation Triggered
      • From: Chuck Hill <email@hidden>
References: 
 >When Is Validation Triggered (From: Kevin Hinkson <email@hidden>)
 >Re: When Is Validation Triggered (From: Chuck Hill <email@hidden>)
 >Re: When Is Validation Triggered (From: Kevin Hinkson <email@hidden>)
 >Re: When Is Validation Triggered (From: Chuck Hill <email@hidden>)
 >Re: When Is Validation Triggered (From: Kevin Hinkson <email@hidden>)
 >Re: When Is Validation Triggered (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: When Is Validation Triggered
  • Next by Date: Re: When Is Validation Triggered
  • Previous by thread: Re: When Is Validation Triggered
  • Next by thread: Re: When Is Validation Triggered
  • Index(es):
    • Date
    • Thread