 
     # @return [String] the primaryKey for the owner ActiveResource of the reflection
     activeResourcePrimaryKey: ->
-      @__activeResourcePrimaryKey ||= @options['primaryKey'] || @__primaryKey(@ActiveResource)
+      @__activeResourcePrimaryKey ||= @options['primaryKey'] || @__primaryKey(@activeResource)
 
     # @return [Boolean] whether or not this reflection is for a collection of resources
     collection: ->


    # @param [String] name the name of the association to reflect on
    # @param [Object] options the options to build into the reflection
    # @param [Class] ActiveResource the ActiveResource class that owns this reflection
    constructor: (@name, @options, @ActiveResource) ->

    # Returns the target klass that this reflection reflects on
    # @note Will throw error if called on polymorphic reflection

    # @return [Boolean] whether or not the inverse reflection is valid
    validInverseReflection = (reflection, inverseReflection) ->
      inverseReflection? &&
        reflection.klass().className == inverseReflection.activeResource.className &&
        canFindInverseOfAutomatically(inverseReflection)

  class @::HasManyReflection extends @::AbstractReflection
