• 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
Many to many and Direct2Web throwing exceptions on save
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Many to many and Direct2Web throwing exceptions on save


  • Subject: Many to many and Direct2Web throwing exceptions on save
  • From: Stephen Brandon <email@hidden>
  • Date: Sat, 8 Feb 2003 13:28:05 +0000

Hi,

WO5.1 on OSX 10.2.3

I'm having a problem with many to many relationships, and trying to get them
to successfully create rows in the join table.

I have a table called Contacts, which has a m2m relationship to SubjectAreas,
via a join table called ContactSubjectAreas.

In EOModeler, I have set up the flattened relationship "fSubjectAreas" in
Contacts.

I have made the toContactSubjectAreas NOT a class property of Contacts. I
have also removed the backwards m2m from SubjectAreas to Contacts, just to
ensure there were no contributing factors there.

I have populated the SubjectAreas table with about 10 values, so I have
something to join to.

When I use the EOModel in a D2W project, everything looks fine (ie I can edit
a contact, tell it to add SubjectAreas, I go into the SA page, attach a SA,
and return to the Contact page). BUT when I try to save the modified Contact,
I get the following exception (appended).

So, can anyone gice me any clues as to what is going on? I expect I have got
the model wrong in some way, but I can't see where. I've removed things as
class properties that don't need to be there, I think I have the flattened
relationship right, but neither D2W nor my own test app are able to create
the joins. Is there something I am missing with propogating primary keys, for
example?

Perhaps someone could send me a minimal EOModel with a working join table?

Many thanks,
Stephen Brandon
email@hidden


Exception occurred while handling request:
java.lang.IllegalArgumentException: Attempt to insert null key into a
com.webobjects.foundation.NSMutableDictionary.
[2003-02-08 13:12:05 GMT] <WorkerThread12>
java.lang.IllegalArgumentException: Attempt to insert null key into a
com.webobjects.foundation.NSMutableDictionary.
        at
com.webobjects.foundation.NSMutableDictionary.setObjectForKey(NSMutableDictionary.java:191)
        at
com.webobjects.eoaccess.EODatabaseContext.recordDatabaseOperation(EODatabaseContext.java:4753)
        at
com.webobjects.eoaccess.EODatabaseContext.databaseOperationForIntermediateRowFromSourceObject(EODatabaseContext.java:4866)
        at
com.webobjects.eoaccess.EODatabaseContext.recordInsertForIntermediateRowFromSourceObject(EODatabaseContext.java:4875)
        at
com.webobjects.eoaccess.EODatabaseContext.relayAttributesInRelationshipSourceObjectDestinationObject(EODatabaseContext.java:4899)
        at
com.webobjects.eoaccess.EODatabaseContext.relayAttributesInRelationshipSourceObjectDestinationObjects(EODatabaseContext.java:4952)
        at
com.webobjects.eoaccess.EODatabaseContext.recordChangesInEditingContext(EODatabaseContext.java:6001)
        at
com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:393)
        at
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:2498)
        at
com.webobjects.directtoweb.D2WInspectPage.tryToSaveChanges(D2WInspectPage.java:110)
        at
com.webobjects.directtoweb.D2WInspectPage.submitAction(D2WInspectPage.java:144)
        at java.lang.reflect.Method.invoke(Native Method)
        at
com.webobjects.foundation.NSKeyValueCoding$1.methodValue(NSKeyValueCoding.java:648)
        at
com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1122)
        at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1223)
        at
com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1465)
        at
com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:448)

(etc etc).
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Many to many and Direct2Web throwing exceptions on save
      • From: Art Isbell <email@hidden>
  • Prev by Date: Re: haveChanges?
  • Next by Date: How do you create an EOQualifier for NSTimestamp data type?
  • Previous by thread: Re: haveChanges?
  • Next by thread: Re: Many to many and Direct2Web throwing exceptions on save
  • Index(es):
    • Date
    • Thread