|
|
Nullpointer Exception for nullable multiply-column keys with activated logging |
Query page
Enter new bug
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>
------- Additional Comment
#1 From
Martin Fuchs
2004-01-10 01:20 -------
Created an attachment (id=371)
Bugfix for the Nullpointer Bug
------- Additional Comment
#2 From
Werner Guttmann
2004-01-23 03:52 -------
Applied supplied patch, making small amendments to the code so that a situation
where a member is null is dealt with in a more informative way.
------- Additional Comment
#3 From
Martin Fuchs
2004-10-19 11:21 -------
OK, let's also close this.
Query page
Enter new bug
This is Bugzilla: the Mozilla bug system. For more
information about what Bugzilla is and what it can do, see
bugzilla.org.
|
|