protected void initEntityFields(CodeWriter writer, SerializerConfig config,
            EntityType model) throws IOException {
        Supertype superType = model.getSuperType();
        if (superType != null) {
            EntityType entityType = superType.getEntityType();
            if (entityType != null && entityType.hasEntityFields()) {
                Type superQueryType = typeMappings.getPathType(entityType, model, false);
                writer.line("this._super = new " + writer.getRawName(superQueryType) + "(type, metadata, inits);");
            }
        }

        for (Property field : model.getProperties()) {
            if (field.getType().getCategory() == TypeCategory.ENTITY) {
                initEntityField(writer, config, model, field);

            } else if (field.isInherited() && superType != null && superType.getEntityType().hasEntityFields()) {
                writer.line("this.", field.getEscapedName(), " = _super.", field.getEscapedName(), SEMICOLON);
            }
        }
    }
Create a new {@code EntitySerializer} instance

@param mappings type mappings to be used
@param keywords keywords to be used
querydsl-codegen/src/main/java/com/querydsl/codegen/DefaultEntitySerializer.java