Skip to content

Commit

Permalink
chore: Get rid of incorrect entity_type deprecation warning #2166 (#2167
Browse files Browse the repository at this point in the history
)
  • Loading branch information
johanandren authored Jun 28, 2024
1 parent 24c21b3 commit 0811ef9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions codegen/core/src/main/scala/kalix/codegen/ModelBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
package kalix.codegen

import java.util.Locale

import scala.jdk.CollectionConverters._

import com.google.common.base.CaseFormat
import com.google.protobuf.Descriptors
import com.google.protobuf.Descriptors.ServiceDescriptor
Expand All @@ -19,6 +17,8 @@ import kalix.ValueEntityDef
import kalix.View
import kalix.WorkflowDef

import scala.annotation.nowarn

/**
* Builds a model of entities and their properties from a protobuf descriptor
*/
Expand Down Expand Up @@ -675,6 +675,7 @@ object ModelBuilder {
.copy(protoName = serviceName.protoName + postfix)
}

@nowarn("msg=deprecated")
private def extractEventSourcedEntity(
serviceProtoDescriptor: ServiceDescriptor,
entityDef: EventSourcedEntityDef,
Expand All @@ -684,7 +685,7 @@ object ModelBuilder {

val protoPackageName = serviceProtoDescriptor.getFile.getPackage

val typeId = getTypeId(entityDef.getTypeId, entityDef.getTypeId)
val typeId = getTypeId(entityDef.getEntityType, entityDef.getTypeId)
EventSourcedEntity(
defineStatefulComponentMessageType(entityDef.getName, messageExtractor(serviceProtoDescriptor)),
typeId,
Expand Down

0 comments on commit 0811ef9

Please sign in to comment.