The root problem was the fact that when loading events from the DB and creating a new instance of an Entity with stream injected, the stream_type property was ignored. In consequence, a new instance was created with empty stream_type and all of the subsequent events were stored without it.
I run the tests before and after the change and it proves the issue is gone now.
Before
This is a bug-fix for https://github.com/ThreeDotsLabs/esja/issues/31
The root problem was the fact that when loading events from the DB and creating a new instance of an Entity with stream injected, the
stream_type
property was ignored. In consequence, a new instance was created with emptystream_type
and all of the subsequent events were stored without it.I run the tests before and after the change and it proves the issue is gone now. Before
After