Odd. Some notes...

Task.getClass().getName() works better as Class#toString isn't the class name =(

Do you not get ANY objects back, or do you get a different object back form the query?

Is the foreign key a primitive type by chance?

-Brian

On Apr 13, 2004, at 8:20 PM, Wil Hunt wrote:

Hey guys,

    I'm having a problem with regard to OJB-managed objects and their
visibility.  Here's the scenario:

1) Create a new object:
Task task = new Task(...);
Transaction tx = _odmg.newTransaction();
tx.begin();
tx.lock(task, Transaction.WRITE);
tx.commit();

Note: task is saved (successfully) with a foreign key X.

If I check the database.. the object is there.  Good.
2) Query ODMG:
select tasks from Task.getClass() where fkeyname = X

This request does not return the above mentioned objects.

If I restart my server (thus restarting OJB) then the objects show up in
further queries.


am I missing something obvious?

Any assistance would be greatly appreciated.

Thanks!

Wil




--------------------------------------------------------------------- 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]



Reply via email to