CodeWringer / strive-foundryVTT

STRIVE system for FoundryVTT
GNU General Public License v3.0
1 stars 0 forks source link

Make objects that can be saved to data base have to explicitly implement a `toDto` function #133

Closed CodeWringer closed 2 years ago

CodeWringer commented 2 years ago

Currently, in document-update-utility.mjs there is a toDto function defined which works in most cases. But in some cases, it causes infinite recursion. Apparently, the mechanisms to avoid recursing through a parent item are insufficient. It is difficult to track down where exactly the infinite recursion happens. It may ultimately not be worth it to always have band-aid solutions for this infinite recursion problem. Instead, making all dto-conversion explicit, gives much greater control, but is also a lot more work intensive.