public static List<DynamicType> createTypes(DynamicClassLoader dcl, String packageName) {   
        String packagePrefix = packageName.endsWith(".") ? packageName : packageName + ".";

        Class<?> employeeClass = dcl.createDynamicClass(packagePrefix + "Employee");
        Class<?> addressClass = dcl.createDynamicClass(packagePrefix + "Address");
        Class<?> phoneClass = dcl.createDynamicClass(packagePrefix + "PhoneNumber");
        Class<?> periodClass = dcl.createDynamicClass(packagePrefix + "EmploymentPeriod");
        Class<?> projectClass = dcl.createDynamicClass(packagePrefix + "Project");
        Class<?> smallProjectClass = dcl.createDynamicClass(packagePrefix + "SmallProject", projectClass);
        Class<?> largeProjectClass = dcl.createDynamicClass(packagePrefix + "LargeProject", projectClass);

        JPADynamicTypeBuilder employee = new JPADynamicTypeBuilder(employeeClass, null, "D_EMPLOYEE", "D_SALARY");
        JPADynamicTypeBuilder address = new JPADynamicTypeBuilder(addressClass, null, "D_ADDRESS");
        JPADynamicTypeBuilder phone = new JPADynamicTypeBuilder(phoneClass, null, "D_PHONE");
        JPADynamicTypeBuilder period = new JPADynamicTypeBuilder(periodClass, null);
        JPADynamicTypeBuilder project = new JPADynamicTypeBuilder(projectClass, null, "D_PROJECT");
        JPADynamicTypeBuilder smallProject = new JPADynamicTypeBuilder(smallProjectClass, project.getType(), "D_PROJECT");
        JPADynamicTypeBuilder largeProject = new JPADynamicTypeBuilder(largeProjectClass, project.getType(), "D_LPROJECT");
        
        configureAddress(address);
        configureEmployee(employee, address, phone, period, project);
        configurePhone(phone, employee);
        configurePeriod(period);
        configureProject(project, smallProject, largeProject, employee);
        configureSmallProject(smallProject, project);
        configureLargeProject(largeProject, project);

        // Must be done here since it requires the PK configurations on Employee
        // and Project
        employee.addManyToManyMapping("projects", project.getType(), "D_PROJ_EMP");
        
        List<DynamicType> types = new ArrayList<DynamicType>();
        types.add(employee.getType());
        types.add(address.getType());
        types.add(phone.getType());
        types.add(period.getType());
        types.add(project.getType());
        types.add(smallProject.getType());
        types.add(largeProject.getType());
        
        return types;
    }