You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Marco Achermann <ma...@bluewin.ch> on 2003/07/02 11:53:34 UTC
basic question: update with odmg api
Hi List
in tutorial2 is a short example about updating an object. It shows that
all modifications on the model happen after the object ist locked by the
tx so the object can be updatet properly.
Is there a way to update a given model though the modifications where
performed bevore locking the model?
tyk
Marco
Re: basic question: update with odmg api
Posted by Marco Achermann <ma...@bluewin.ch>.
Hi Thomas,
there is light at the end of the tunnel :-)
tyk
Marco
Thomas Mahler wrote:
> Hi Marco,
>
> Marco Achermann wrote:
>
>> Hi List
>>
>> in tutorial2 is a short example about updating an object. It shows
>> that all modifications on the model happen after the object ist
>> locked by the tx so the object can be updatet properly.
>>
>> Is there a way to update a given model though the modifications where
>> performed bevore locking the model?
>
>
> This is not supported by ODMG API (not OJB specific!)
> With a simple trick you can still implement it:
>
> 1. lock the object to the transaction
> 2. cast the transaction object to org.apache.ojb.odmg.TransactionImpl.
> 3. call the method markdirty(object)
>
> cheers,
> thomas
>
>>
>> tyk
>> Marco
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
Re: basic question: update with odmg api
Posted by Thomas Mahler <th...@web.de>.
Hi Marco,
Marco Achermann wrote:
> Hi List
>
> in tutorial2 is a short example about updating an object. It shows that
> all modifications on the model happen after the object ist locked by the
> tx so the object can be updatet properly.
>
> Is there a way to update a given model though the modifications where
> performed bevore locking the model?
This is not supported by ODMG API (not OJB specific!)
With a simple trick you can still implement it:
1. lock the object to the transaction
2. cast the transaction object to org.apache.ojb.odmg.TransactionImpl.
3. call the method markdirty(object)
cheers,
thomas
>
> tyk
> Marco
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>