|
|
Re: CDO, transient features, and views? [message #423594 is a reply to message #423585] |
Thu, 02 October 2008 18:17 |
|
Simon McDuff schrieb:
> They are not propagated when the transaction is saved.
> You can modify transient feature.(I didn't try...).
> The read-only apply only the persisted space.
>
I don't think that we've tests for this case.
Certainly transient features of non-TRANSIENT CDOObjects are *not*
persisted by CDO.
But I think that modeled transient features will have a generated setter
(if not prevent by other settings)
that will delegate to CDOStore (an EStore not a backend IStore!) where
we call getRevisionForWriting().
This method _should_ throw an IllegalStateException if the associated
CDOView is read-only.
Cheers
/Eike
> "Bryan Hunt" <bhunt@mac.com> wrote in message
> news:gc2ovc$i28$1@build.eclipse.org...
>
>> How does CDO deal with transient features? I assume they are not
>> propagated when the resource is saved. Does this mean that if I have a
>> CDOView, I can set a transient feature, or is the model truly read-only?
>>
>> Bryan
>>
>>
>
>
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: CDO, transient features, and views? [message #423854 is a reply to message #423849] |
Wed, 08 October 2008 07:38 |
|
Simon McDuff schrieb:
> Eike, Bryan,
>
> I added a new test in InitialTest.testReadTransientValue. I changed
> the model to have Product1.description as a transient feature.
>
> - Transient features are not delegate to CDOStore.
You're right. It's obvious from the respective super methods of
CDOObjectImpl:
public void dynamicSet(int dynamicFeatureID, Object value)
{
EStructuralFeature eStructuralFeature =
eDynamicFeature(dynamicFeatureID);
if (eStructuralFeature.isTransient())
{
eSettings[dynamicFeatureID] = value;
}
else
{
eStore().set(this, eStructuralFeature,
InternalEObject.EStore.NO_INDEX, value == NIL ? null : value);
[...]
> - Using CDOView you can still set them since CDO doesn't interfere
> with transient feature.
Correct.
> - You can use them without being wish.
What do you mean here?
>
> I think it should behave like that as well. What do you think ?
First I thought this could be configurable but looking again I think it
must behave like it does now. We have no space for transient features in
CDORevisionData and this structure is sent to the server which can not
respect local view configurations.
Cheers
/Eike
>
> Simon
>
>
>
> "Eike Stepper" <stepper@esc-net.de> wrote in message
> news:gc3377$i29$3@build.eclipse.org...
>> Simon McDuff schrieb:
>>> They are not propagated when the transaction is saved.
>>> You can modify transient feature.(I didn't try...).
>>> The read-only apply only the persisted space.
>>>
>> I don't think that we've tests for this case.
>> Certainly transient features of non-TRANSIENT CDOObjects are *not*
>> persisted by CDO.
>> But I think that modeled transient features will have a generated
>> setter (if not prevent by other settings)
>> that will delegate to CDOStore (an EStore not a backend IStore!)
>> where we call getRevisionForWriting().
>> This method _should_ throw an IllegalStateException if the associated
>> CDOView is read-only.
>>
>> Cheers
>> /Eike
>>
>>> "Bryan Hunt" <bhunt@mac.com> wrote in message
>>> news:gc2ovc$i28$1@build.eclipse.org...
>>>
>>>> How does CDO deal with transient features? I assume they are not
>>>> propagated when the resource is saved. Does this mean that if I
>>>> have a CDOView, I can set a transient feature, or is the model
>>>> truly read-only?
>>>>
>>>> Bryan
>>>>
>>>>
>>>
>>>
>>>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.04130 seconds