CoreData: uniqueness constraints and to-one mandatory inverse relationship
<p>Please, explain me, why core data denies to create structure shown below.</p>

<pre><code>    |Employee |                                            |Department|
    |------   | &lt;&lt;--(opt)-------inverse-------(non_opt)--&gt; |----------|
    |id (un)  |                                            |name (un) |
    |fullName |

    * un - unique, opt - optional
</code></pre>

<p>At some department zero or more employees can work but every employee must works at one and only at one department. It is obvious schema for MySql, for example. For Core Data I made inverse relationship for avoiding consistency errors. But Core Data has its own vision and this is what it says for me:</p>

<blockquote>
  <p>error: Misconfigured Entity: Entity Department cannot have uniqueness constraints and to-one mandatory inverse relationship Employee.department</p>
</blockquote>

<p>I have already found some suspicious solutions (make all relations optional, remove unique from Department.name and check it "programmatically", remove inverse relations), but I want to understand, where I make mistake or if not - what Apple is trying to said with this strange logic?</p>