prooph / pdo-event-store

PDO implementation of ProophEventStore http://getprooph.org
BSD 3-Clause "New" or "Revised" License
111 stars 56 forks source link

Failing test #227

Closed patrickkusebauch closed 2 years ago

patrickkusebauch commented 3 years ago

Failing test for issue #226

prolic commented 3 years ago

Will look into it asap, super busy these days.

codeliner commented 3 years ago

@prolic @fritz-gerneth any ideas what would be the best way to solve the problem?

a) Escape dots in aggregate id by default b) Document that a custom stream strategy should be used in this case

patrickkusebauch commented 3 years ago

@codeliner not directed at me, but I think just documenting it is a bad idea. At least, it should throw an Exception. But then you would need to change to the method signature. That would be a breaking change. Escaping by default would be great.

prolic commented 3 years ago

I tried to look into this today. I don't think there is a solution to this problem without BC. Everything before the dot is treated as the schema name (in postgres that's "public" by default) but can be any other schema as well.

I suggest you use another delimiter for separation of aggregate name and id.

@codeliner @fritz-gerneth @enumag thoughts?

codeliner commented 3 years ago

A breaking change is no option at this point and I also don't have another idea. One needs to accept this limitation. Since AggregateStreamStrategy is not the best choice for most use cases because projections are too slow (see note here), I consider this an edge case. I'm not happy with it, but time is limited.