 
     sharedMethods   :
       instance      : [
-        "update",'follow', 'unfollow', 'remove', 'like', 'fetchLikedByes', 'checkIfLikedBefore',
+        'update', 'follow', 'unfollow', 'remove', 'like', 'checkIfLikedBefore', 'fetchLikedByes',
         'fetchFollowersWithRelationship', 'fetchFollowingWithRelationship', 'fetchCreator', 'install'
       ]
       static        : [

            callback err
          else
            callback null, app

  checkIfLikedBefore: secure ({connection}, callback)->
    {delegate} = connection
    {constructor} = @
    Relationship.one
      sourceId: @getId()
      targetId: delegate.getId()
      as: 'like'
    , (err, likedBy)=>
      if likedBy
        callback null, yes
      else
        callback err, no

  like: secure ({connection}, callback)->
    {delegate} = connection
    {constructor} = @
    unless delegate instanceof constructor.getAuthorType()
      callback new Error 'Only instances of JAccount can like things.'
    else
      Relationship.one
        sourceId: @getId()
        targetId: delegate.getId()
        as: 'like'
      , (err, likedBy)=>
        if err
          callback err
        else
          unless likedBy
            @addLikedBy delegate, respondWithCount: yes, (err, docs, count)=>
              if err
                callback err
              else
                @update ($set: 'meta.likes': count), callback
          else
            @removeLikedBy delegate, respondWithCount: yes, (err, count)=>
              if err
                callback err
                console.log err
              else
                @update ($set: 'meta.likes': count), callback

  install: secure ({connection}, callback)->
    {delegate} = connection

  @mixin Followable       # brings only static methods
  @::mixin Followable::   # brings only prototype methods
  @::mixin Taggable::
  @::mixin Likeable::

  {Inflector,JsPath,secure,daisy} = bongo
  {Relationship} = jraphical
