In case of changing entity's class there is an ability to override
entityTypeName. But in case of changing command's or event's class, that don't have a such propery cause no extending PersistentEntity class. How to refactor code in such case?
For example, we have the following entity class:
public class UserEntity extends PersistentEntity<UserCommand, UserEvent, User> {
...
}
And now we'd like to move UserCommand and UserEvent classes to another package. When do that the error is traced:
[ERROR] from com.lightbend.lagom.internal.javadsl.persistence.PersistentEntityActor in ecs-user-service-akka.actor.default-dispatcher-18 - Persistence failure when replaying events for persistenceId [UserEntitybda2d45f-0b0c-3184-8342-a441eab3b19a]. Last known sequence number [0]
java.io.NotSerializableException: Cannot find manifest class [com.idbs.ecs.ur.api.UserAddedEvent] for serializer [com.lightbend.lagom.internal.jackson.JacksonJsonSerializer].
...
Is it possible to do properly in Lagom world?