Skip to content

Commit

Permalink
setting keyValue flag for ESE and KVE
Browse files Browse the repository at this point in the history
  • Loading branch information
aludwiko committed Jan 9, 2025
1 parent be27f44 commit e0d7804
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions akka-javasdk/src/main/scala/akka/javasdk/impl/SdkRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,12 @@ private final class Sdk(
})
}
eventSourcedEntityDescriptors :+=
new EventSourcedEntityDescriptor(componentId, clz.getName, readOnlyCommandNames, instanceFactory)
new EventSourcedEntityDescriptor(
componentId,
clz.getName,
readOnlyCommandNames,
instanceFactory,
keyValue = false)

case clz if classOf[KeyValueEntity[_]].isAssignableFrom(clz) =>
val componentId = clz.getAnnotation(classOf[ComponentId]).value
Expand All @@ -475,7 +480,12 @@ private final class Sdk(
})
}
keyValueEntityDescriptors :+=
new EventSourcedEntityDescriptor(componentId, clz.getName, readOnlyCommandNames, instanceFactory)
new EventSourcedEntityDescriptor(
componentId,
clz.getName,
readOnlyCommandNames,
instanceFactory,
keyValue = true)

case clz if Reflect.isWorkflow(clz) =>
val componentId = clz.getAnnotation(classOf[ComponentId]).value
Expand Down

0 comments on commit e0d7804

Please sign in to comment.