ios - Core data - can't set nil to an optional relationship -



ios - Core data - can't set nil to an optional relationship -

i configured next core info class:

class project: nsmanagedobject { @nsmanaged var lastupdatetime: nsdate @nsmanaged var name: string @nsmanaged var prevproejct: project }

a project in info model can have previous project. configured relationship 'optional'. however, field in class not configured optional - can't set nil prevproject.

so how can set relationship nil?

i have 2 thoughts on this:

@nsmanaged var prevproejct: project?

or:

prevproejct = nsnull()

ios core-data ios8

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -