 
     @All: () ->
       collection = @_MakeCollection()
-      url = @_GetURLBase()
+      url = urljoin @_GetURLBase()
       $http(
         method: "GET"
         url: url

      data = @_toObject()
      if @$meta.persisted and @$id?
        method = 'PUT'
        url = @_getURLBase() + "#{@$id}"
      else
        method = 'POST'
        if @constructor.idField of data
          delete data[@constructor.idField]
        url = @_getURLBase()

      # TODO: check deferred/promise re-setup
      @_setupPromises()

      @

    _getURLBase: ->
      _urljoin @constructor.urlPrefix, @constructor.urlEndpoint

    _fetchRelations: ->
      @_fetchReferences()
