Hi All,

I am getting the following exception when i try to save my object.

java.lang.NullPointerException
at com.webobjects.eoaccess.EODatabaseContext.recordChangesInEditingContext(EODatabaseContext.java:6099) at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:412) at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3165)

Lets say i have an object A which has to-one relationship to B and many-many relationship to C.

now in the EOModeler i created a D entity which acts like a join table between A and C since the relationship between A and C is many - many.so this is wat it looks in the EOModel 1 * * 1
A  -------------> D --------------> C

but i didn't set the to-many relationship from A ---->D as a instance property instead i have flattened the relationship so that i can access C directly from A using A.flattenedRelationship , I made this flattened relationship as a class property.

Now coming back to the problem, once the relationship is established from A--> C if i try to change the relationship from A-->B its throwing the above exception.

if i remove the relationship from A---> D and then try to establish the relationship between A ---> B then i am not getting any error .

if i establish relationship from A---> B and then establish relationship form A-->C then also i am getting any exception only when i establish relationship from A-->C first n then A---> B i am getting the exception.

NOTE : B and C also have relationship in between them. following are the relationships

A to-many B
A many to many C
B to-many C

OR
 1                     *
A----------------> B

 *                     *
A---------------->C

 1                     *
B---------------->C


Any clues why i am getting the exception for the flow mentioned.

Thanks in Advance

Regards,
--Sri

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to