From my understanding, non-persisted fields are the best way to handle data that needs to be calculated using some business logic. However, since these fields aren’t saved to the database, we can’t use them in generic inquires and reports. If I instead saved this field to the database, I think I would need to make sure that it is recalculated either every time one of the values in the business logic equation changes, or if a user or anything else is interacting with it, including a report/inquiry. I’m not sure of the best way of doing that or if I’m missing something.
Best answer by Dmitrii Naumov
View original