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

RE: EOObjectNotAvailableException


  • Subject: RE: EOObjectNotAvailableException
  • From: "Watkins, Garry" <email@hidden>
  • Date: Tue, 25 Jul 2006 11:20:13 -0400
  • Thread-topic: EOObjectNotAvailableException

Really not the answer that I wanted.  Personally, I think that it is a bug in EO, if the relationship is defined as NOT mandatory, and it encounters a EOObjectNotAvailableException it should return null.  However, I want to continue to use EOGenericRecords since it is mainly a reporting type application.  Does anyone know where the Fault is triggered inside the EO stack so that I might be able to trap the operation with AspectJ?  This would also require that I have the EORelationship that triggered the fault.
 
Thanks
Garry

From: Ken Anderson [mailto:email@hidden]
Sent: Tuesday, July 25, 2006 11:08 AM
To: Watkins, Garry
Cc: email@hidden
Subject: Re: EOObjectNotAvailableException

Garry,

EOF is not happy with such situations - if the key is not null, it expects the to-one to exist.

There are a few workarounds - the simplest is to turn the relationship into a to-many and check the object count before returning null or the one object in the array.

Ken

On Jul 25, 2006, at 10:57 AM, Watkins, Garry wrote:

I am getting EOObjectNotAvailableException when I have optional relationships that are linked by a primary key.  I do not control the data entry that is associated with these records, so I cannot automatically create empty ones  Is there a way for me to trap these exceptions and just get a null back.
 
This is a run down of my scenario:
 
I have Client, ClientExtensionAsbestos, ClientExtensionSilica entities.  They all have a primary key of A_Client.  Both of the Extension entities are optional depending on the clients case type.  A client may have one or more extension records but they are all optional relationships.  If I trigger the fault extensionSilica (or any other extension) and it does not exist, I want to receive null back.
 
Any pointers would be appreciated.
 
Thanks,
Garry

 

Confidential & Privileged

Unless otherwise indicated or obvious from its nature, the information contained in this communication is attorney-client privileged and confidential information/work product. This communication is intended for the use of the individual or entity named above.  If the reader of this communication is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error or are not sure whether it is privileged, please immediately notify us by return e-mail and destroy any copies--electronic, paper or otherwise--which you may have of this communication.

 _______________________________________________
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

 

Confidential & Privileged

Unless otherwise indicated or obvious from its nature, the information contained in this communication is attorney-client privileged and confidential information/work product. This communication is intended for the use of the individual or entity named above.  If the reader of this communication is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error or are not sure whether it is privileged, please immediately notify us by return e-mail and destroy any copies--electronic, paper or otherwise--which you may have of this communication.

 _______________________________________________
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: EOObjectNotAvailableException
      • From: Anjo Krank <email@hidden>
    • Re: EOObjectNotAvailableException
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: EOObjectNotAvailableException
  • Next by Date: Re: Newbie question about highlighting rows
  • Previous by thread: Re: EOObjectNotAvailableException
  • Next by thread: Re: EOObjectNotAvailableException
  • Index(es):
    • Date
    • Thread