All OQL queries are executed as SQL queries against the DB.
In your case the object was nos written to the DB, so a query won't be able
to find it.

But you could try the following:
Transaction tx = ...;
A objA = new A();
objA.setName("Smith");
tx.lock (objA);
tx.checkpoint();

loadObjectByQuery();

checkpoint writes to DB but keeps the tx open and also maintains the lock on
objA.
The DB should be able to find ojbA by an SQL query then...

cheers,
Thomas


> -----Original Message-----
> From: Emmanuel Dupont [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 06, 2003 5:36 PM
> To: OJB Users List
> Subject: Qury on an object Locked but not in Db
> 
> 
> All,
> 
>  
> 
> Is it possible to do such thing :
> 
>  
> 
>  
> 
> A objA = new A();
> 
> objA.setName("Smith");
> 
>  
> 
> Lock (objA);
> 
>  
> 
> [...]
> 
>  
> 
> No commit is done and later if I want to work with objA, 
> could I query to
> OJB to find my right A instance with getObhjectByQuery() 
> something else ?
> 
>  
> 
>  
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to