Are Queries Permitted/Valid Inside a Write Transaction?

@Jay Right. That’s all straightforward. But I’m not sure the same applies to collection properties on an Object (List, MutableSet, etc.).

If we change the contents of those collection properties during the write transaction, is an immediate query against the collection property while still within the open write transaction, such as:

.where({ $0.collectionProperty.count == 0 })

going to work with the collection property as it exists inside the open write transaction (with changes), or does it query against the “old” version of the collection property that hasn’t been updated in the database yet because the write hasn’t been committed?

I’m looking for a definitive answer because, in testing with a live app that’s using Realm Sync, the answer seems to be a race condition of sorts.