On Chapters 7, 8 we KeyPaths were used but I’m a bit confused by the $ symbol.
I have a basic understanding of KeyPaths in Swift but I haven’t seen something like this.
Is this unique to Vapor?
Essentially it allows us to access the property wrapper rather than the value which gives us access to things like the column name and whether the value is eager loaded etc, stuff we can’t access using the property itself
If I understand correctly simply using “the value” here wouldn’t be enough because we are dealing with a database so we need access to the property wrapper which holds information required to perform such a query.
The projected property type here is FieldProperty<Acronym, String>.
I think the confusing part here for me was/is the concept of projected values.
Since it seems like a projected value can be any type and in turn projected values are used differently. Which requires me to understand more about the Field property wrapper and its related types.