• 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: Read only attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read only attributes


  • Subject: Re: Read only attributes
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 8 Sep 2008 16:37:43 -0700


On Sep 8, 2008, at 4:27 PM, Florijan Stamenkovic wrote:

On Sep 08, 2008, at 18:48, Chuck Hill wrote:

Primary keys.

Oh yeah. That makes sense too... Hm, do you know if EOF throws a validation exception when trying to modify a read only attribute?

Yes. If you make your FK attributes public you will get this exception when saving updates. It is kind of wrong in that case, but many people have seen this "Attempt to modify a read only attribute" error message.



IIRC there was talk against making primary keys class properties, one of the arguments being that one should never modify them. But, if they are read only, and EOF throws, then that would not have been possible, no?

Personally, I don't have any issues with public primary keys as long as they are used responsibly. The objection is usually either religious or out of fear of irresponsible use. EOF will NOT let you change them.



You can also mark them as such in the model to have EOF verify there have not been any changes.

I am guessing that (if EOF indeed does not accept modifications of RO attributes) the purpose of this is to preserve existing data, and in situations in which data is created outside of EOF?

I think you can create new objects with these attributes assigned a value. You just can't change it afterwards.



Chuck

On Sep 8, 2008, at 3:46 PM, Florijan Stamenkovic wrote:

Hi all,

I'm looking into EOAttribute.isReadOnly(). Docs point out that an attribute is read only when it is derived (makes sense), but mention no other circumstance. So, anyone knows any other situation in which an attribute is read only?

Thanks,
F
_______________________________________________
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


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects










-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ 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: Read only attributes
      • From: Florijan Stamenkovic <email@hidden>
References: 
 >Read only attributes (From: Florijan Stamenkovic <email@hidden>)
 >Re: Read only attributes (From: Chuck Hill <email@hidden>)
 >Re: Read only attributes (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: Re: Read only attributes
  • Next by Date: Re: Static Resources? - WAS Re: WebObjects/WOnder CSS and Image path issues
  • Previous by thread: Re: Read only attributes
  • Next by thread: Re: Read only attributes
  • Index(es):
    • Date
    • Thread