[CDO][0.8.0] Changing Model [message #104666] |
Sun, 16 December 2007 09:58  |
Eclipse User |
|
|
|
Hi Eike,
I would like to know what is the expected behavior of the following.
I have model A.
I generate my code through genmodel.
It creates me Static classes.
I instantiate ModelA... so I have objectA.
Persist it in my Store.
My store will receive the new packages.
Now I stop everything and change my model(I added one attribute). Generate
the code again.
Create a new object and persist it.
It failed (client side) because it doesn`t know what changed.
Should the change be detected and propagate back to the server ?
Thank you
|
|
|
|
|
Re: [CDO][0.8.0] Changing Model [message #104751 is a reply to message #104743] |
Sun, 16 December 2007 11:40  |
Eclipse User |
|
|
|
Originally posted by: stepper.sympedia.de
This is a multi-part message in MIME format.
--------------070806020300070400060002
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Simon McDuff schrieb:
> Thank you Eike,
>
> If the client change the version in the URI... would it be possible for him
> to still accessing the data from the old version ?
>
Only via the "old" model (URI + generated classes).
> How CDO framework will behave ?
>
From the point of CDO these models don't have a relation. So it should
behave as usual.
> Is it the responsability of the back-end to migrate the data ?
>
I'd say if the back-end pretends to provide model evolution it should
provide means for automatic data migration.
You remember that I explicitely said "CDO does not provide for model
evolution" ;-)
Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j
>
> "Eike Stepper" <stepper@sympedia.de> a
|
|
|
Re: [CDO][0.8.0] Changing Model [message #612824 is a reply to message #104666] |
Sun, 16 December 2007 11:15  |
Eclipse User |
|
|
|
Hi Simon,
You're talking about what I know under the term "model evolution" and it
is clearly not supported by CDO.
That said, while designing and implementing several persistence systems
over the last 10 years (some of them were orthogonally persistent) I
thought about model evolution many times but always came to the
conclusion that the effort needed to properly (consistently) implement
it is too high for me.
I strongly suggest to regard deployed packages as immutable and the
redeployment of changed packages (under the same URI) as sabotage. I
think it's better to include a version identifier into the package URI
and technically think of the old and the new package as of totally
different packages (which they are in fact). Another solution are
extension packages which use EClass inheritance to add features.
Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j
Simon McDuff schrieb:
> Hi Eike,
>
> I would like to know what is the expected behavior of the following.
>
> I have model A.
> I generate my code through genmodel.
> It creates me Static classes.
> I instantiate ModelA... so I have objectA.
> Persist it in my Store.
> My store will receive the new packages.
>
> Now I stop everything and change my model(I added one attribute). Generate
> the code again.
>
> Create a new object and persist it.
>
> It failed (client side) because it doesn`t know what changed.
>
> Should the change be detected and propagate back to the server ?
>
> Thank you
>
>
>
>
>
>
|
|
|
|
Re: [CDO][0.8.0] Changing Model [message #612829 is a reply to message #104743] |
Sun, 16 December 2007 11:40  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------070806020300070400060002
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Simon McDuff schrieb:
> Thank you Eike,
>
> If the client change the version in the URI... would it be possible for him
> to still accessing the data from the old version ?
>
Only via the "old" model (URI + generated classes).
> How CDO framework will behave ?
>
From the point of CDO these models don't have a relation. So it should
behave as usual.
> Is it the responsability of the back-end to migrate the data ?
>
I'd say if the back-end pretends to provide model evolution it should
provide means for automatic data migration.
You remember that I explicitely said "CDO does not provide for model
evolution" ;-)
Regards,
Eike Stepper
----
http://wiki.eclipse.org/CDO
http://wiki.eclipse.org/Net4j
>
> "Eike Stepper" <stepper@sympedia.de> a
|
|
|
Powered by
FUDForum. Page generated in 0.05252 seconds