I was taught that "objects don't own anything", so I couldn't say that
"the city has many great pubs".
Instead, I had to use
"there are many great pubs in the city".
Was I taught right, or it is grammatical to indicate possession to objects using the verb "to have"?