[baseten-users] ERROR: null value in column "xyz" violates not-null constraint when trying to insert mandatory data
Tuukka Norri
tuukka.norri at karppinen.fi
Fri May 22 15:14:54 EEST 2009
Sascha Gresk kirjoitti 22.5.2009 kello 1.48:
> Solved ... After watching http://developer.apple.com/cocoa/coredatatutorial/coredata_mov3.html
> I just gave my Property a "Default Value". Thats an excellent
> solution for me, and maybe it is even
> suitable for the tutorial.
Hi!
Another option is to create the object using BXDatabaseContext's
method -createObjectForEntity:withFieldValues:error: and pass the
required value. If you want to create the object using
BXSynchronizedArrayController, a default value is needed, since NOT
NULL constraint can't be deferred.
--
Best regards,
Tuukka Norri
MK&C
More information about the baseten-users
mailing list