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]

Reply via email to