..the new law has not provided for such an eventuality

One-third of Shanghai’s 17 million inhabitants are migrants, yet it is virtually impossible for them to become citizens with their identity cards, which in principle give them access to public services.  In Shanghai, as in all other Chinese cities, there is a sort of local nationality by blood. With the winds of reform blowing over the city in the Year of the Rooster, the municipality has decided to issue local identity cards on the basis of marriage, but the conditions are so restrictive that they appear ridiculous. A non-Shanghai woman married to a Shanghai man can get nationality after fifteen years of her marriage, which means the couple’s children will automatically become citizens of Shanghai, as nationality is handed down by the mother. The authors of this daring innovation told me, though, that a man from Shanghai would have to be very “poor or handicapped” to marry a “foreigner”. What happens if a non-Shanghai man marries a Shanghai woman? I asked. The new law has not provided for such an eventuality, they told me at the mayor’s office, because it was unthinkable that a Shanghai woman would marry an “outsider”.

Town-hall officials said that if all immigrants were granted citizenship, by marriage or otherwise, they would flood schools nad hospitals and demand public housing. The city’s infrastructure wouldn’t be able to take the load. Were the news to spread to the countryside, millions would flock to Shanghai, creating huge ghettos around the city.

- Guy Sorman, The Empire of Lies (2006)