Closed patpaev closed 10 months ago
The EventSourcery::Event persisted? method is just a simple check of whether an ID is present.
EventSourcery::Event
persisted?
However it's documented that you can pass an ID through as a param when initializing the class.
This means that Events could erroneously respond true to persisted? if you've passed an id parameter whether it's been written to the database or not.
true
id
This issue has now been resolved by removing the potentially misleading persisted? method. This change is available in 1.0.0 of the event_sourcery gem.
The
EventSourcery::Event
persisted?
method is just a simple check of whether an ID is present.However it's documented that you can pass an ID through as a param when initializing the class.
This means that Events could erroneously respond
true
topersisted?
if you've passed anid
parameter whether it's been written to the database or not.