Hi,

There is m-m relationship between A and B entities which are in different 
models, but in same database. I can create and platen this relationship in 
EOModler and got AB table as well.
AB is in the same DB and only has compound PK like A_ID and B_ID.

When I tried to do saveChanges got this error


[2009-12-15 12:6:48 NZDT] <WorkerThread0> java.lang.NullPointerException
        at 
com.webobjects.eoaccess.EODatabaseContext.primaryKeyForIntermediateRowFromSourceObject(EODatabaseContext.java:4845)
        at 
com.webobjects.eoaccess.EODatabaseContext.databaseOperationForIntermediateRowFromSourceObject(EODatabaseContext.java:4863)
        at 
com.webobjects.eoaccess.EODatabaseContext.recordInsertForIntermediateRowFromSourceObject(EODatabaseContext.java:4888)
        at 
com.webobjects.eoaccess.EODatabaseContext.relayAttributesInRelationshipSourceObjectDestinationObject(EODatabaseContext.java:4913)
        at 
com.webobjects.eoaccess.EODatabaseContext.relayAttributesInRelationshipSourceObjectDestinationObjects(EODatabaseContext.java:4966)
        at 
com.webobjects.eoaccess.EODatabaseContext.recordChangesInEditingContext(EODatabaseContext.java:6036)
        at 
com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:373)
        at 
com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)


And I found only updateObjects could has two entities's details and 
insertedObjects does not print out anything.

Not sure this does not work in across models or something else need setup?

thanks



Xiaowen(Kevin) Ren

Analyst Programmer
Channel Applications, Retail Applications
ANZ National Bank Ltd
Level 6 ASB Tower
2 Hunter Street 
PO Box 1791
Wellington
Phone: 04 4365363
Fax: 04 8028696





"This e-mail and any attachments to it (the "Communication") is, unless 
otherwise stated, confidential,  may contain copyright material and is for the 
use only of the intended recipient. If you receive the Communication in error, 
please notify the sender immediately by return e-mail, delete the Communication 
and the return e-mail, and do not read, copy, retransmit or otherwise deal with 
it. Any views expressed in the Communication are those of the individual sender 
only, unless expressly stated to be those of Australia and New Zealand Banking 
Group Limited ABN 11 005 357 522, or any of its related entities including ANZ 
National Bank Limited (together "ANZ"). ANZ does not accept liability in 
connection with the integrity of or errors in the Communication, computer 
virus, data corruption, interference or delay arising from or in respect of the 
Communication."
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to