I guess you'll need to figure out how to filter out deleted editions (as you figured out, it will be the ones that have data_id = NULL) as part of this hasMany relationship. I can point you to the BookshelfJS docs: https://bookshelfjs.org/api.html although I am not sure how to do the requested change
Thanks for looking into this! I see your point about addressing the root cause. Amending the ORM code to filter out deleted editions directly would definitely be the cleaner solution.
I'll keep you posted as I dig into this further. Thanks for the pointers!
monkey[m]
From what I can tell, the getEditionsCreditedToAuthor is probably easier than trying to filter out editions while using hasMany, but you'll need to figure out how and where to use it