title: Not able to save to CoreData. SQLCore dispatchRequest Object of class " " not among allowed top level class list
body: <p>I got this error message when I tried to save the data to core data. I think it got maybe something to do that some of the attributes in my Entities are of type Transformable.</p>
  
  <p>Error Message:</p>
  
  <pre class="lang-swift prettyprint-override"><code>[error] error: SQLCore dispatchRequest: exception handling request: &lt;NSSQLSaveChangesRequestContext: 0x60000029c8f0&gt; , Object of class Address is not among allowed top level class list (
      NSArray,
      NSDictionary,
      NSSet,
      NSString,
      NSNumber,
      NSDate,
      NSData,
      NSURL,
      NSUUID,
      NSNull
  ) with userInfo of (null)
  </code></pre>
  
  <p>Entities and their attributes in the .xcdatamodeld file (screenshots):</p>
  
  <ol>
  <li><a href="https://i.stack.imgur.com/ogGWD.png" rel="nofollow noreferrer">User Entity Image Link</a></li>
  <li><a href="https://i.stack.imgur.com/zsiea.png" rel="nofollow noreferrer">Address Entity Image Link</a></li>
  </ol>
  
  <hr>
  
  <p>User Class UPDATED:</p>
  
  <pre><code>@objc(User)
  public class User: NSManagedObject, Decodable {
  
      private enum CodingKeys: String, CodingKey { case address, company , avatar, email, id, name, phone, username, website }
  
       required convenience public init(from decoder: Decoder) throws {
  
           guard let context = decoder.userInfo[.context] as? NSManagedObjectContext else { fatalError("NSManagedObjectContext is missing") }
  
           let entity = NSEntityDescription.entity(forEntityName: "User", in: context)!
           self.init(entity: entity, insertInto: context)
  
           let values = try decoder.container(keyedBy: CodingKeys.self)
  
           address = try values.decode(Address.self, forKey: .address)
           avatar = try values.decode(String.self, forKey: .avatar)
           company = try values.decode(Company.self, forKey: .company)
           email = try values.decode(String.self, forKey: .email)
           id = try values.decode(Int32.self, forKey: .id)
           name = try values.decode(String.self, forKey: .name)
           phone = try values.decode(String.self, forKey: .phone)
           username = try values.decode(String.self, forKey: .username)
           website = try values.decode(String.self, forKey: .website)
  
       }
  }
  </code></pre>
  
  <hr>
  
  <p>Address Class UPDATED::</p>
  
  <pre><code>@objc(Address)
  public class Address: NSManagedObject, Decodable {
  
      private enum CodingKeys: String, CodingKey { case geo, city, street, suite, zipcode }
  
          required convenience public init(from decoder: Decoder) throws {
  
              guard let context = decoder.userInfo[.context] as? NSManagedObjectContext else { fatalError("NSManagedObjectContext is missing") }
  
              let entity = NSEntityDescription.entity(forEntityName: "Address", in: context)!
              self.init(entity: entity, insertInto: context)
  
              let values = try decoder.container(keyedBy: CodingKeys.self)
  
                  street = try values.decode(String.self, forKey: .street)
                  suite = try values.decode(String.self, forKey: .suite)
                  city = try values.decode(String.self, forKey: .city)
                  zipcode = try values.decode(String.self, forKey: .zipcode)
                  geo = try values.decode(Geo.self, forKey: .geo)
        }
  
  }
  </code></pre>
  
  <hr>
  
  <p>Address Class UPDATED:</p>
  
  <pre><code>extension Address {
  
      @nonobjc public class func fetchRequest() -&gt; NSFetchRequest&lt;Address&gt; {
          return NSFetchRequest&lt;Address&gt;(entityName: "Address")
      }
  
      @NSManaged public var city: String
      @NSManaged public var street: String
      @NSManaged public var suite: String
      @NSManaged public var zipcode: String
      @NSManaged public var geo: Geo
  
  }
  </code></pre>
  
  <p>All suggestions and code samples are appreciated. Thanks. :)</p>