You need to override the Getter or much better reassign the same field name. Think about it: there should only be one field named "className" only the value should be different when inheriting. It makes sense.