• 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 creating a new object, ERAttachment in transaction won't save
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When creating a new object, ERAttachment in transaction won't save


  • Subject: Re: When creating a new object, ERAttachment in transaction won't save
  • From: David Holt <email@hidden>
  • Date: Thu, 16 Dec 2010 09:36:42 -0800

Hi Peter,

It should just work if you've set the right rules.

Check out the example project on the page below. I created new Persons with avatars and I don't remember doing anything special, certainly not in the model.

http://wiki.objectstyle.org/confluence/display/WONDER/ERAttachment+Framework

What rules are you using for the attachment property?

David


On 2010-12-16, at 9:11 AM, Dan Beatty wrote:

Hi Peter,
Welcome to the list.  I am surprised the Davids, the gentlemen, and Chuck have not responded yet.  

The only way I am aware of is in the awake from insertion, namely to have one always inserted when the EO is created.  But, that seems like swap fly with shot gun approach.

V/r

Daniel Beatty
Computer Scientist, Detonation Sciences Branch
Code 474300D
2400 E. Pilot Plant Rd. M/S 1109
China Lake, CA 93555
email@hidden
(760)939-7097




On 12/15/10 10:39 AM, "P C" <email@hidden> wrote:

I have a table called person, and the ERAttachment is an avatar to that person. My migrations setup initial values for a  person, and I can add an avatar (ERAttachment) to an existing person.
 
 
 
When I try to create a new person (within ERModernLook) and try to add the avatar I get a NullPropertyException thrown. I think what happens (correct me if I'm wrong) is that the there is no primary key assigned to my person object and values for attributes in person object are not saved in the database and when ERAttachment tries to make a relationship pointing back to the person object it throws the exception "type: NullPropertyException; additionalExceptions: ()>".
 
How do I fix this? Thank you for your help.
 
Very respectfully,
Peter


_______________________________________________
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
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 creating a new object, ERAttachment in transaction won't save
      • From: David Holt <email@hidden>
References: 
 >Re: When creating a new object, ERAttachment in transaction won't save (From: Dan Beatty <email@hidden>)

  • Prev by Date: Re: MySQL 5.5 goes GA Release
  • Next by Date: Re: When creating a new object, ERAttachment in transaction won't save
  • Previous by thread: Re: When creating a new object, ERAttachment in transaction won't save
  • Next by thread: Re: When creating a new object, ERAttachment in transaction won't save
  • Index(es):
    • Date
    • Thread