You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Events received during a subscription are dispatched directly to the given block, thus they don't go through the relation pipeline. That means that mappers don't affect the received events:
rom.relation(:tasks).as(:entity).subscribedo |event|
# event is not an entity here...end
Is there an easy way to fix this?
The text was updated successfully, but these errors were encountered:
But how do I pass the event through the mapper, if there is one? Right now I'm just yielding the event as it arrives (asynchronously), I don't see how moving the logic up to relation would help :/ Is there some way to pass the data through the Composite relation from there?
Ah, right, that's tricky. You'd have to extend Relation::Composite too. I don't think it's a good idea.
Maybe it would be a better idea to have that interface available via repository? It looks like on_event yields individual objects in a callback-style so that's not gonna work so well with ROM's data pipeline.
Events received during a subscription are dispatched directly to the given block, thus they don't go through the relation pipeline. That means that mappers don't affect the received events:
Is there an easy way to fix this?
The text was updated successfully, but these errors were encountered: