title: Core Data and custom attribute type
body: <p>Evening, </p>
  
  <p>I'm trying to build an Entity A with a property x of type T.</p>
  
  <p>T is an enum that I created.</p>
  
  <hr>
  
  <p>How should I set xcdatamodel to use a custom type for an attribute?</p>
  
  <p><strong>My current set up is:</strong></p>
  
  <pre><code>attribute x, type: Undefined, CustomClass: T.
  </code></pre>
  
  <p><strong>But I have the error:</strong> </p>
  
  <blockquote>
    <p>x .... core data must have a defined type.</p>
  </blockquote>
  
  <p><strong>Specific Purpose:</strong></p>
  
  <p>x is a "mood" attribute with 3 different moods possible, that's why I choose the enum.</p>