Hello,
I sent you a patch for a NullPointer Exception problem that occured for me when
using castor JDO with multiply-column keys and activated logging.
There are some columns null in some rows I retreive from the DB. Well, may be
this only works for me because I use read-only access for this class.
This shows the Java code I used: (all real names changed)
OQLQuery oql = jdo_db.getOQLQuery(
"CALL SQL "+
"select distinct col1, col2, col3, col4, col5 "+
"from VIEW1 "+
"order by 1, 2, 3, 4 "+
"AS Classname"
);
QueryResults results = oql.execute(Database.ReadOnly);
And this is shows the mapping definition:
<class name="Classname" identity="col1 col2 col3 col4 col5">
<map-to table="VIEW1"/>
<field name="col1" type="string" required="true" direct="true">
<sql name="COLUMN1" type="char"/>
</field>
<field name="col1" type="string" required="true" direct="true">
<sql name="COLUMN2" type="char"/>
</field>
<field name="col3" type="string" required="false" direct="true">
<sql name="COLUMN3" type="char"/>
</field>
<field name="col4" type="string" required="false" direct="true">
<sql name="COLUMN4" type="char"/>
</field>
<field name="col5" type="string" required="false" direct="true">
<sql name="COLUMN5" type="char"/>
</field>
</class>
Bugfix for the Nullpointer Bug