Welcome to the forum!
q.fetch_only
doesn’t actually prevent you from accessing other fields, it just causes the fields you specify to be sent along with the row (pre-caching those fields). It’s purely an optimization tool. If you have a few media columns you know you won’t be accessing, you can use q.fetch_only
to not send those media columns, speeding up the transfer. But if you go ahead and access those columns anyway, Anvil will make a separate call to the server to retrieve them.
There’s a feature request around somewhere about adding in a feature that would prevent access to specific columns.
Edit: here’s the feature request if you want to like it to show support: Client-readable views on a subset of columns