diff --git a/querydsl-core/src/main/java/com/mysema/query/codegen/BeanSerializer.java b/querydsl-core/src/main/java/com/mysema/query/codegen/BeanSerializer.java
index <HASH>..<HASH> 100644
--- a/querydsl-core/src/main/java/com/mysema/query/codegen/BeanSerializer.java
+++ b/querydsl-core/src/main/java/com/mysema/query/codegen/BeanSerializer.java
@@ -49,6 +49,8 @@ public class BeanSerializer implements Serializer{
     private final String javadocSuffix;
     
     private boolean addToString, addFullConstructor;
+    
+    private boolean printSupertype = false;
 
     public BeanSerializer() {
         this(true, " is a Querydsl bean type");
@@ -97,7 +99,12 @@ public class BeanSerializer implements Serializer{
         for (Annotation annotation : model.getAnnotations()){
             writer.annotation(annotation);
         }
-        writer.beginClass(model);
+        if (printSupertype && model.getSuperType() != null) {
+            writer.beginClass(model, model.getSuperType().getType());
+        } else {
+            writer.beginClass(model);
+        }
+        
 
         bodyStart(model, writer);
         
@@ -203,5 +210,11 @@ public class BeanSerializer implements Serializer{
         this.addFullConstructor = addFullConstructor;
     }
 
+    public void setPrintSupertype(boolean printSupertype) {
+        this.printSupertype = printSupertype;
+    }
+    
+    
+
     
 }
added new BeanSerializer option