I am using a Castor transaction to update the item: I db.load() the Item 
(without loading the actual Dashboard it belongs to), make a change and then 
db.commit().  





----- Original Message ----
From: Ralf Joachim <ralf.joac...@syscon.eu>
To: dev@castor.codehaus.org
Sent: Thu, February 11, 2010 11:17:43 PM
Subject: Re: [castor-dev] Caching question

Hi August,

I expect the update of the Item happens directly on the database and not
through Castor.

If you have an open transaction which previously loaded the unchanged
Item before the update and you load the Item once again through this
transaction, you will get the same Item instance which does not reflect
the modification. When loading the Item in a transaction which began
after the update, you should get the changed Item. It does not matter
wether the Item is loaded directly with db.load(Item.class,...) or
inirectly with db.load(Dashboard.class,...).

Regards
Ralf


August Detlefsen schrieb:
> I have a mapped object with a number of layers of sub objects: 
>
> Dashboard
>  -> Section (ArrayList) 
>      -> SectionItem (ArrayList)
>          -> Item
>
> Item has cache-type="none" specified in the mapping, but all of the other 
> classes in the tree have no cache-type specified and thus use the default 
> count-limited cache. 
>
> My question is: If I make an update to an Item, and then db.load the main 
> Dashboard object, will it include the newly updated Item, or will I get a 
> cached Dashboard object that also includes an older cached version of the 
> Item that was just modified? 
>
> Thanks,
> August 
>
>
>
>      
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>  
-- 

Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Internet: www.syscon.eu
E-Mail: ralf.joac...@syscon.eu

Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to