Thanks for your reply - it’s got crucial insight that I need
That code is long gone, but the misunderstanding continues
For the sake of clarification, if I swapped the calls would the request then have the contents of the 1st row (undetermined, but valid) and the results of the events() call would have pulled data – or would I have to add a fetch() ?
const rows = await EventType
Your reminder of static vs instance methods is greatly appreciated, but my confusion over the deferral of side-effects (in this case, actually reading from the database) lives on
How do you debug this stuff without resorting to just trying it and seeing what comes out the end?
The chaining of the methods is nice, but trying to figure out which ones cause pulls and which one’s do not makes it hard for me to be clear on where the execution pointer is when a given method may be called. When I get tired I just start thrashing about, rearranging the methods to see what works.
I’ve re-read the parts on eager & lazy eager loading so many times, and still don’t really grasp this fully - I am always looking to write code that is more predictable to me. The deferral of side-effects until some [to me] indeterminate point is very difficult. How to add a level of retrieval is unclear to me.
I’m under the gun to deliver an Alpha tomorrow and I’m fairly behind in my plans – I’m having to do all the parts I can and smoke & mirrors the rest for now. Luckily it’s an Alpha.
Do you have any debugging tips you could share? I think I need to be in the weeds to see how the snakes move.
I so appreciate your time and attention and will share concrete code with my next questions.