You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/01/10 04:39:18 UTC
[GitHub] chetanmeh commented on a change in pull request #3164: Add type property to entity documents - Take 2
chetanmeh commented on a change in pull request #3164: Add type property to entity documents - Take 2
URL: https://github.com/apache/incubator-openwhisk/pull/3164#discussion_r160588553
##########
File path: common/scala/src/main/scala/whisk/core/entity/WhiskEntity.scala
##########
@@ -60,11 +60,17 @@ abstract class WhiskEntity protected[entity] (en: EntityName) extends WhiskDocum
/** The primary key for the entity in the datastore */
override final def docid = fullyQualifiedName(false).toDocId
+ /** Type of entity */
+ def entityType: String
+
/**
* Returns a JSON object with the fields specific to this abstract class.
*/
protected def entityDocumentRecord: JsObject =
- JsObject("name" -> JsString(name.toString), "updated" -> JsNumber(updated.toEpochMilli()))
+ JsObject(
+ "name" -> JsString(name.toString),
+ "updated" -> JsNumber(updated.toEpochMilli()),
+ "type" -> JsString(entityType))
Review comment:
Ack. Used `entityType` as property name as `kind` is already being used for `exec` to avoid confusuion
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services