> Nacho, this may be a silly question, have you used the datastore api
> or app-engine?

Quite a bit. Why?

I have not performed big live schema changes yet, though. That's why I
am asking.

>> This is the point were we differ. To me it makes all sense to prepare
>> a low-level API for schema migration, but I would not bind it to the
>> current mappings. I mean, the possibilities here are just too many,
>> and the up-to-date persistence mappings are not relevant to do the
>> migration. They seem to be more of a hassle than helpful for that
>> purpose.
>
> Okay, I'll bit. How do you do schema migration (both on a live system,
> and in a batch way), in the low-level api?. In the datastore every
> entity has its own schema. There is no way to alter the schema without
> altering the data that is stored in an entity.

Maybe if we stick to an example it is going to be easier for us both to follow.

* Say I have a data model that is persisted as two classes, A and B. B
is nested inside A.
* Now I decide to make a refactor. B is not going to be nested inside
A anymore. Instead, it's going to be a root class and use a Key
attribute to reference A.

How do you use the schema migration features of any of these
frameworks to make this migration easier? From my point of view the
easiest way is to use the low-level API to migrate the data into a
copy that will be used by the next application version, but maybe I am
missing something.

>> I may be wrong, so I am just asking. I was comparing the examples
>> given here with what would be the equivalent of porting to GAE the
>> typical schema upgrade script, and didn't see much benefit in it.
>
> What "update script" are you talking about? The only way to update
> data in the datastore is write it back to the datastore; There is no
> DDL, or metadata language, or data transformation system for the
> datastore, that I know about.

Excuse my poor use of language. I was meaning "to translate to Java
code using the Datastore API the equivalent of a DDL script", as
opposed to "introducing into the annotation system all kinds of
madness associated to any kind of migration I could think of in the
future". Maybe I oversimplified the sentence.

> They can create schema, and migrate schema automatically (generating
> the alter scripts without dropping the tables), assuming the types of
> changes you do are supported.

It's provided as a standalone tool, separate from the hibernate core.
There are not annotations to help in this process, for example. That
was the original question.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to