Yes within China people from Shanghai also call themselves Shanghainese and their dialect is also very different like Cantonese so its nothing special. Shanghainese consider themselves, like New Yorker more cultured than anyone else in China including Cantonese.
But people of Chinese ethnicity will first always identify themselves as Chinese not Cantonese or Shanghainese or Beijinger or Fujianese except for some people who prefer to think they are superior then being Chinese.
Its like saying New Yorker is different from a Californian and they are not American. When they are outside USA they will prefer to be called New Yorker not American.
But people of Chinese ethnicity will first always identify themselves as Chinese not Cantonese or Shanghainese or Beijinger or Fujianese except for some people who prefer to think they are superior then being Chinese.
Its like saying New Yorker is different from a Californian and they are not American. When they are outside USA they will prefer to be called New Yorker not American.