• 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
addObjectToBothSidesOfRelationshipWithKey Fails Silently?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

addObjectToBothSidesOfRelationshipWithKey Fails Silently?


  • Subject: addObjectToBothSidesOfRelationshipWithKey Fails Silently?
  • From: Hunter Hillegas <email@hidden>
  • Date: Tue, 5 Apr 2005 11:25:59 -0700

I am seeing something I haven't seen before and I'm not sure how to trouble shoot it.

I have an entity, Issue, and two related entities, Feature and Department. Feature and Department are very similar. Issue has to-many relationships to both of them.

I have a three step process.

1. Create Issue
2. Create Feature
3. Create Department

Each step uses a nested EC derived from the same parent EC. Each step saves its changes to the nested EC before moving to the next step.

The process for creating features and departments is basically the same:

1. Created nested EC.
2. Bring Issue into nested EC.
3. Created Feature/Department using createAndInsertInstance()
4. Create relationships with addObjectToBothSidesOfRelationshipWithKey
5. Save nested EC

At the end of the process the parent EC is saved and the objects are supposed to be committed to the DB.

So, my Issues are being created. My departments are being created and associated with the issue. My features are being created but the call to addObjectToBothSidesOfRelationshipWithKey seems to do nothing here. The FK isn't populated and thus the relationship doesn't exist.

The FK on Features and Departments are both set to not allow nulls, so when saving the parent EC, I get an exception... Looking at the SQL, you can see the issue_id (FK) isn't even included in the INSERT statement columns... Any ideas why not? issueID is not a class property of Feature, doesn't allow nulls, and is an int4, same as the PK of Issue.

I've stared at the code for features and departments for about an hour and they *look* identical to me... I must be missing something obvious but I can't see it.

I checked the archives to no avail. Has anyone seen this issue before? Any thoughts on resolving it?

Thanks,
Hunter

_______________________________________________
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: addObjectToBothSidesOfRelationshipWithKey Fails Silently?
      • From: Arturo Perez <email@hidden>
  • Prev by Date: Re: JIT Login (WPO) and DirectAction component
  • Next by Date: Re: addObjectToBothSidesOfRelationshipWithKey Fails Silently?
  • Previous by thread: Re: NSDictionary keys to be all lowercase ALL THE TIME...??
  • Next by thread: Re: addObjectToBothSidesOfRelationshipWithKey Fails Silently?
  • Index(es):
    • Date
    • Thread