• 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
NullPropertyExcetion when saveChanges() ???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NullPropertyExcetion when saveChanges() ???


  • Subject: NullPropertyExcetion when saveChanges() ???
  • From: Gustavo Pizano <email@hidden>
  • Date: Fri, 12 Jun 2009 10:55:05 +0200

Hello I dunno why Im getting this ...
 

 <er.extensions.validation.ERXValidationException object: <xws.locXMan.eo.PROJECT pk:"null">; propertyKey: received_date; type: NullPropertyException; additionalExceptions: (<er.extensions.validation.ERXValidationException object: <xws.locXMan.eo.PROJECT pk:"null">; propertyKey: special_notes; type: NullPropertyException; additionalExceptions: ()>, <er.extensions.validation.ERXValidationException object: <xws.locXMan.eo.PROJECT pk:"null">; propertyKey: pROJECT_CATEGORY; type: MandatoryToOneRelationshipException; additionalExceptions: ()>, <er.extensions.validation.ERXValidationException object: <xws.locXMan.eo.PROJECT pk:"null">; propertyKey: pROJECT_STATUS; type: MandatoryToOneRelationshipException; additionalExceptions: ()>, <er.extensions.validation.ERXValidationException object: <xws.locXMan.eo.PROJECT pk:"null">; propertyKey: wORK_TYPE; type: MandatoryToOneRelationshipException; additionalExceptions: ()>)>

I have the following code .. I commented the lines to check btu still the same... sometimes this gives me a headache.. I checked in another projects i did, and I fowllow as I did ther and nothing..


public WOActionResults saveInfo() {

PROJECT theProject = new PROJECT();

session().defaultEditingContext().insertObject(theProject);

theProject.setDescription(description);

theProject.setDue_date(dueDate);

//theProject.setINVOICE(null);

theProject.setName(name);

theProject.setPid(id);

//theProject.setPROJECT_STATUSRelationship(status); //2nd attempt

//theProject.addObjectToBothSidesOfRelationshipWithKey(status, PROJECT.P_ROJEC_T_STATUS_KEY); // I try this first

//theProject.addObjectToBothSidesOfRelationshipWithKey(categ, PROJECT.P_ROJEC_T_CATEGORY_KEY);  // I try this first

//theProject.setPROJECT_CATEGORYRelationship(categ); //2nd attempt

//theProject.setReceived_date(receivedDate);

//theProject.setSpecial_notes(specialNotes);

//theProject.setWORK_TYPE(workT);

// theProject.addObjectToBothSidesOfRelationshipWithKey(workT(), PROJECT.W_OR_K_TYPE_KEY);

//theProject.setWORK_TYPERelationship(workT); //2nd attempt

//theProject.addObjectsToBothSidesOfRelationshipWithKey(unitsList,PROJECT.U_NIT_S_OTHER_SS_KEY );

NSLog.out.appendln("HERE SO far so good");

((Session)session()).defaultEditingContext().saveChanges();

NSLog.out.appendln("the datawas sasved");

return null;

}


I attach a schema of my model... some things like names change but the relationships are the same... 

GRR!!!

Thanks for the help

Gustavo



Attachment: Picture 4.png
Description: PNG image

 _______________________________________________
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: NullPropertyExcetion when saveChanges() ???
      • From: Gustavo Adolfo Pizano <email@hidden>
  • Prev by Date: Re: WOAction Constructor
  • Next by Date: Re: WOAction Constructor
  • Previous by thread: Re: WOAction Constructor
  • Next by thread: Re: NullPropertyExcetion when saveChanges() ???
  • Index(es):
    • Date
    • Thread