Three posts regarding an obvious bug and no comment from anyone, although I
provided a fix.
Sorry guys, that's it for me and Castor, I'll go for ObjectBridge.
ObjectBridge does not all that I need but I can work around missing features
on my own. At least it seems to be reliable and stable.
Thanks
Rainer
> -----Original Message-----
> From: Bischof, Rainer
> Sent: Freitag, 14. September 2001 10:07
> To: '[EMAIL PROTECTED]'
> Subject: Again: Bug in JDO?
> Importance: High
>
>
> Does anybody else use Castor JDO in it's current version for
> relational mapping? Do you use 1-many relationships? If so,
> how have you fixed these bugs?
>
> Thanks
> Rainer
>
> > -----Original Message-----
> > From: Bischof, Rainer
> > Sent: Donnerstag, 13. September 2001 12:54
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: [castor-dev] Problem with example. Bug?
> > Importance: High
> >
> >
> > After having a closer look it appears to me as a bug:
> >
> > Upon deletion of the first Computer Castor also marks the
> > dependent Prod_Details as deleted.
> > On results.hasMore() it populates the second Computer
> > instance. During this process it does not only add the
> > Prod_Detaisl of the second Computer as expected but also the
> > Prod_Details of the first computer. These are already marked
> > deleted. Therefore an exception is thrown and later
> > results.hasMore() returns false.
> >
> > The Problem seems to be located in SqlEngine.SqlQuery.loadRow()
> >
> > This method shut clear multi-field if it is in the first row:
> >
> > private int loadRow( Object[] fields, boolean isFirst
> > ) throws SQLException, PersistenceException
> > {
> > int count = _engine._ids.length + 1;
> >
> > // Load all the fields.
> > for ( int i = 0 ; i < _engine._fields.length ; ++i ) {
> > if ( !_engine._fields[i].load )
> > continue;
> >
> > if ( _engine._fields[i].multi ) {
> >
> > //RB: inserted to clear the multi-field
> > if ( isFirst ){
> > if(fields[i] == null){
> > fields[i] = new ArrayList();
> > }else{
> > ((ArrayList) fields[i]).clear();
> > }
> > }
> > fields[i] = loadMultiField( i, count,
> fields[i] );
> > }else if (isFirst ){
> > fields[i] = loadSingleField( i, count );
> > }
> > count += _engine._fields[i].columns.length;
> > //System.out.println( "loadRow: fields[" + i
> > + "] = '" + fields[i] + "' (count = '" + count + "')" );
> > }
> > return count;
> > }
> >
> > This would also eliminate the null check in loadMultiField,
> > if this is not necessary in other contexts.
> >
> > Is this a known Bug or did I get something wrong here?
> > I am using the downloadable CVS Snapshot but it seems to be
> > in the distribution as well?
> >
> >
> > Thanks
> > Rainer
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Bischof, Rainer
> > > Sent: Donnerstag, 13. September 2001 00:39
> > > To: [EMAIL PROTECTED]
> > > Subject: [castor-dev] Problem with example
> > > Importance: High
> > >
> > >
> > > Hi,
> > >
> > > I am in trouble with the example examples.jdo.Test.java :
> > > I modified the computer query section to return and delete
> > > all computers
> > > that exist. The section that creates computers is modified to
> > > create two
> > > computers instead of one.
> > > Everything else including mapping.xml remains untouched. I
> > > use a local mySQL
> > > DB and JBuilder 5 with JDK1.3, all running under Win2K. I
> > > tried both the
> > > 0.9.3 as well as the CVS snapshot download.
> > >
> > > Result:
> > > Two computers are created in the tables on the first run, the
> > > computer query
> > > returns nothing.
> > > On the second run the the program performs the compter query
> > > which should
> > > return two computers. It deletes the first one and but the
> > > query does not
> > > return the second one to delete, it just drops through
> and continues
> > > execution outside the query section.
> > > Funny thing: If I remove the delete statement the query does
> > > return the
> > > second computer....
> > >
> > > I experienced the same thing with my own test programs.
> > > Any idea?
> > >
> > > BTW: I also encountered in my own code an issue that was
> > > reported earlier by
> > > Oliver Lieven in the Msg "Why does Castor remove dependent
> > > Objects after
> > > query?"
> > >
> > > Thanks
> > > Rainer
> > >
> > >
> > > -----------------------------------------------------------
> > > If you wish to unsubscribe from this mailing, send mail to
> > > [EMAIL PROTECTED] with a subject of:
> > > unsubscribe castor-dev
> > >
> >
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev