const user = await User.query().where('id', id).first()
const patchedUser = await user.$query().patch(input).returning('*')
In this example, user will return me a single user. Now I want to patch the user and return it. If I use the above, patchedUser will be an array of users so instead I have to use:
const patchedUser = await user.$query().patch(input).first().returning('*')
It feels a little bit weird to call first after updating already fetched single item.
Is it somehow possible that objection will automatically return single item if first was used before patching/updating?
I'm also interested in usage of limit with first() method in this issue.