Update lib/entity.coffee