[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FireFault error in optional to One relationship



I have an Entity ActionItem that has a optional relationship
toProgressStatus this relationship is from the primary key of ActionItem to
the primary key of ProgressStatus. As I understand EOF this is a problem. I
think I followed the directions in the 3.5.1 EOF book pg 113 to "Handle the
Exception" by creating a method in  ActionItem.m that returns nil if there
is an error performing [toProgressStatus self]. This seemed to work for
most of my displays. Then kaboom I have a method that fetches a singe
ActionItem and updates a attribute of it. After I fetch the Item I call the
atributes set method and then try to save changes in the EditingContext.
For some reason it gives me a fire fault during the save changes. Does
anyone know what I might have done wrong.

Also I would like to understand the difference between flattening a
relationship and traversing the key path. I had ASSUMED that a flattened
relationship was mearly shorthand for traversing the key path. In reading
more of EOF that does not appear to be true. Based on what I read in the
EOF book I am beginning to believe that there may be few cases where a
flattened relationship won't add problems. Am I misreading or finally
seeing the light?

I did have a flattened relationship from an ActionItem to something on the
other side of ProgressStatus but I removed that without changing the
problem.

Thanks for all of your help.
Bob Stuart