       hostnameAlias : 'sparse'
 
     schema          :
+
       domain        :
         type        : String
         required    : yes

        fetchDomains:
          (signature Function)
        createDomain: [
          (signature Function)
          (signature Object, Function)
        ]
        # getTldList:


        callback new KodingError "CNAME settings are wrong.", "CNAMEMISMATCH"

  createDomain = (domainData, account, callback)->

    model = new JDomain domainData
    model.save (err)->
      return callback err  if err

      rel = new Relationship
        targetId   : model.getId()
        targetName : 'JDomain'
        sourceId   : account.getId()
        sourceName : 'JAccount'
        as         : 'owner'

      rel.save (err)->
        return callback err  if err

      callback err, model

  @createDomain: secure (client, options, callback)->

