Hi,
I allso have this problem. It is because you have
since some version after 0.9.6 a direct reference
to the objects in the cash of OJB.

If you have an object A with attribute a,b,c and you save
this, then the object in the cach is a reference to A.
So if you now change the attribute b, then on the same time
the attribute b is also changed in the cach. If you try now
to update the object, then the cach think there was no changes,
and no update will be send to the db.

For me it is a bug. My workaround is to make an clone of object
A before a save it.

regards 
Matthias

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 3. April 2003 16:32
To: [EMAIL PROTECTED]
Subject: RE: Default Cache - bug? design catostrophe? user error?


For me the problem appears without any reference/collection.

If you get a simple query to retrieve an object, modify an attribute of this
object in the database and get this object a second time the attribute won't
be updated.

Is it a bug or is there something wrong in my app?

Sylvain


-----Message d'origine-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Date: jeudi, 3. avril 2003 16:20
�: OJB Users List
Cc: [EMAIL PROTECTED]
Objet: RE: Default Cache - bug? design catostrophe? user error?



Well, that kind of works.  That is, it works great, unless you have
bidirectional references that you want refreshed, in which case you get a
Stack Overflow....



|---------+--------------------------->
|         |           Ron Gallagher   |
|         |           <[EMAIL PROTECTED]|
|         |           uth.net>        |
|         |                           |
|         |           04/02/2003 11:48|
|         |           AM              |
|         |           Please respond  |
|         |           to "OJB Users   |
|         |           List"           |
|         |                           |
|---------+--------------------------->
 
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|
  |
|
  |        To:      [EMAIL PROTECTED]
|
  |        cc:
|
  |        Subject: RE: Default Cache -  bug?  design catostrophe?  user
error?
|
  |
|
 
>---------------------------------------------------------------------------
-----------------------------------------------------------------------|



David --

It's not used by the cache.  It's used by the PersistenceBroker when it
retrieves an object.  If the 'target' object is found in the cache, then
any reference/collection descriptors that are marked with refresh="true"
are re-populated before the 'target' is returned to the caller.

Ron Gallagher
Atlanta, GA
[EMAIL PROTECTED]

>
> From: [EMAIL PROTECTED]
> Date: 2003/04/02 Wed AM 11:44:27 EST
> To: "OJB Users List" <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED]
> Subject: Re: RE: Default Cache -  bug?  design catostrophe?  user error?
>
>
> No, I haven't.  I will take a look at that, but the code I saw in the
cache
> didn't look like it would do that....



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


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