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

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

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -