Hello Martin van den Bemt 

Today I notices that you reply the my previous message.
( I think that I suscribe the common user list but I didn't , how foolish I am !)

I added following method to TestSchema in schema package
to show the generated xml document

    private void write(Object bean, boolean wrapCollectionsInElement)
    throws Exception
    {
        BeanWriter writer = new BeanWriter();
        writer.setXMLIntrospector(createXMLIntrospector());
        // specifies weather to use collection elements or not.
        
writer.getXMLIntrospector().setWrapCollectionsInElement(wrapCollectionsInElement);
        // we don't want to write Id attributes to every element
        // we just want our opbject model written nothing more..
        writer.setWriteIDs(false);
        // the source has 2 spaces indention and \n as line seperator.
        writer.setIndent("  ");
        writer.setEndOfLine("\n");
        writer.write(bean);
    }

and checked the result for the 2 test methods.

write(schema, true) looks good
but 
write(schema, false) generated wrong xml file.
please refer to the following log message.

     [java] .
     [java] <PHYSICAL_SCHEMA autocreate="yes">>
     [java]   <DBMS kind="ODBC">>
     [java]     <DBID>>
     [java]       <DB_DATA_TYPE name="VARCHAR"/>
     [java]       <DB_DATA_TYPE name="INTEGER"/>
     [java]       <DB_DATA_TYPE name="CHAR"/>
     [java]       <DB_DATA_TYPE name="TEXT"/>
     [java]       <DB_DATA_TYPE name="DATETIME"/>
     [java]       <DB_DATA_TYPE name="LONG RAW"/>
     [java]       <DB_DATA_TYPE name="CLOB"/>
     [java]       <DB_DATA_TYPE name="FLOAT"/>
     [java]     
     [java]     </DBID>
     [java]   
     [java]   </DBMS>
     [java]   <DBMS kind="TEST">
     [java]   </DBMS>
     [java] 
     [java] </PHYSICAL_SCHEMA>.
     [java] <PHYSICAL_SCHEMA autocreate="yes">
     [java]   <DBMSS>
     [java]     <DBMS kind="ODBC">
     [java]       <DBIDS>
     [java]         <DBID>
     [java]           <DB_DATA_TYPES>
     [java]             <DB_DATA_TYPE name="VARCHAR"/>
     [java]             <DB_DATA_TYPE name="INTEGER"/>
     [java]             <DB_DATA_TYPE name="CHAR"/>
     [java]             <DB_DATA_TYPE name="TEXT"/>
     [java]             <DB_DATA_TYPE name="DATETIME"/>
     [java]             <DB_DATA_TYPE name="LONG RAW"/>
     [java]             <DB_DATA_TYPE name="CLOB"/>
     [java]             <DB_DATA_TYPE name="FLOAT"/>
     [java]           </DB_DATA_TYPES>
     [java]         </DBID>
     [java]       </DBIDS>
     [java]     </DBMS>
     [java]     <DBMS kind="TEST">
     [java]       <DBIDS/>
     [java]     </DBMS>
     [java]   </DBMSS>
     [java] </PHYSICAL_SCHEMA>
     [java] Time: 0.812
     [java] 
     [java] OK (2 tests)
     [java] 


Reply via email to