protected void customField(EntityType model, Property field, SerializerConfig config,
            CodeWriter writer) throws IOException {
        Type queryType = typeMappings.getPathType(field.getType(), model, false);
        writer.line("// custom");
        if (field.isInherited()) {
            writer.line("// inherited");
            Supertype superType = model.getSuperType();
            if (!superType.getEntityType().hasEntityFields()) {
                String value = NEW + writer.getRawName(queryType) + "(_super." + field.getEscapedName() + ")";
                writer.publicFinal(queryType, field.getEscapedName(), value);
            } else {
                writer.publicFinal(queryType, field.getEscapedName());
            }
        } else {
            String value = NEW + writer.getRawName(queryType) + "(forProperty(\"" + field.getName() + "\"))";
            writer.publicFinal(queryType, field.getEscapedName(), value);
        }
    }
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