rivantsov / vita

VITA Application Framework
MIT License
59 stars 15 forks source link

Schedule command will not trigger the Entity Saving Event #200

Closed jasonlaw closed 3 years ago

jasonlaw commented 3 years ago

Hi @rivantsov ,

I found that the schedule command, eg, session.ScheduleDelete(deleteQuery), will not trigger the Entity Saving event.

Is this a bug or by intention? Anyway workaround?

Thanks.

rivantsov commented 3 years ago

this is by design; when you fire a delete query, the entities to be deleted might not even be loaded, and there might be lot of them - that's the point of the facility, to delete in db by some criteria without loading to client. This applies both to Delete and ScheduleDelete

jasonlaw commented 3 years ago

Thanks for the prompt response. Clear now, I will handle it in different way. Thanks!