@Fetch load() from TCA reducer #97
-
Updating an older TCA application and switching to SharingGRDB from another database.so lots of new stuff to learn. Hopefully there is a simple answer to my question as I learn to use FetchAll, FetchOne, and Fetch, which I decided to use since I need implement a dynamic query. Here is what I have which works but I can't figure out to call the load() function.
From fetch() I have a dynamic query that selects the trips using a data range:
Everything works fine except for the query updates when the display dates change, either from the TCA Reducer or from the View with a task similar to this:
The error I get is
which has me stumped and looking for a little help. While I found examples like the DynamicQuery case study, none show doing this in TCA so any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @sillygoose, could you create a quick, small repro of this problem so that we can take a look? |
Beta Was this translation helpful? Give feedback.
Added code to the TCA CaseStudies and got a different error that confirms I am an old fool:
Back in my project I had the FetchKeyRequest structure in State
so the solution was to add State to the load():
and it builds and works correctly.
So why the quirky error diagnostic? Guessing that the Swift compiler was confused by my TCA feature is also Trips:
Sorry to bother you, I guess I'll treat myself to the new episode that just dropped.