Hi Sanyi, looks like a bug. But IMO it is not a dangerous one.
cheers, tHOMAS > -----Ursprüngliche Nachricht----- > Von: Sandor KELEMEN [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 30. Januar 2003 01:32 > An: OJB Users List > Betreff: JDO Query result: peristent or not > > > Hi, > > I've just started to examine JDO. In my test application the > JDOHelper.isPersistent() call returns false for an instance > returned as the > result of a query. Is it a bug or can you imagine a situation > where this > could be a correct behaviour? > > The relevant code: > ---------------------------- > pm.currentTransaction().begin(); > > // getProductById(): uses the pm w/o starting a new > transation to lookup the > // Product object > Product toEdit = getProductById( pm, productId); > > if ( toEdit != null) > { > log.info( "persistent = " + JDOHelper.isPersistent( toEdit)); > log.info( "product name = " + toEdit.getName()); > } > else > { > log.info( "NOT found"); > } > ---------------------------- > > Produces the following output: > persistent = false > product name = TestProd > > Any help would be greatly appreciated. > > Best Regards, > Sanyi > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]