not using permissions commandContext anymore, the listener gets executed
in the same context as the entity creation, we are only separating this
into a event listener / use case to decouple v1 and v2 codes.
for some reason some of the entity saves at this point ocury without the
entities having _id even though they where already created and in this
case the special permission commandId gets replaced on the entities
leaving them "corrupted" with a wrong id.
this pr fixes the issue because we do not need to use the
commandContext, but the original issue causing this potentially remains
and should be understood.
not using permissions commandContext anymore, the listener gets executed in the same context as the entity creation, we are only separating this into a event listener / use case to decouple v1 and v2 codes.
for some reason some of the entity saves at this point ocury without the entities having _id even though they where already created and in this case the special permission commandId gets replaced on the entities leaving them "corrupted" with a wrong id.
this pr fixes the issue because we do not need to use the commandContext, but the original issue causing this potentially remains and should be understood.