You mean FK? I have not seen many problems with PKs, but FKs as class properties is asking for trouble. "Ask and ye shall receive." :-)

Chuck


On Feb 12, 2008, at 12:58 PM, Mike Schrag wrote:

Is your PK a class property? Does it need to be? I have seen problems before with PK as a class property that EOF tries to overwrite (this is not supposed to happen, but you decrease your odds by making it a non-class property). On your relationship, are you setting propagates primary key and/or owns destination? That can have an impact on how PK's are treated as well.

On Feb 12, 2008, at 3:51 PM, Chuck Hill wrote:

Maybe Anjo knows.  :-)

What are the delete rules? I have seen this sort of thing before, but I can't recall what caused it.

Chuck


On Feb 12, 2008, at 12:35 PM, Sennikov, Dimitri wrote:

Thanks,

Due to lack of other options, I have tried switching to using No
Prototype and setting a custom Data Type to NSArray. I don't see much
change and it still ends up trying to NULLIFY the department IDs.

I have also tried now to no success passing a String departmentName from
the WOBrowser.

I then fetch Department EO from the database using departmentName and
use addObjectToBothSidesOfRelationshipWithKey(departmentEO,
"departments");

It still produces the SET ID = NULL erroneous sql statement.

Chuck, any suggestions now that it is immutable type?

Any input is appreciated.

Dmitri

-----Original Message-----
From: Anjo Krank [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 12, 2008 3:04 PM
To: Chuck Hill
Cc: Sennikov, Dimitri; WebObjects Dev Apple
Subject: Re: Error on saveChanges with WOBrowser or WOCheckBoxList

Dimitri,

Am 12.02.2008 um 20:47 schrieb Chuck Hill:

Using mutable classes as attributes is a very, very, very bad idea.
I know, I have tried it.  EOF expects attributes to be immutable.
Make it immutable and add cover methods to add and remove items.
Until you fix this, there is no point in looking at the "ID getting
set to null" problem.

Pay no heed to Chuck's ramblings. You should be OK as long as your
don't change the array directly. It would be best if you defined your
accessors an returning NSArray.

Cheers, Anjo


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
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/mschrag% 40mdimension.com

This email sent to [EMAIL PROTECTED]




--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
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