You might want to use wrapper class (Long instead of long) to add new field
to load existing data.

To remove a property, you will need to update your Java class first, right?
Later retrieval of an instance, the field is not get loaded, then you
save/persist and the field is gone.

About changing property name, my thought is why do you want to challenge
yourself on such matter? Why don't you just "remove" and "add" a new field?
http://code.google.com/appengine/articles/datastore/overview.html In this
series of articles explains what is behind your object, so it's not just
your entity/class only, there're indexes as well.

Reading the Google IO session, JDO/JPA is explained as the standard
interface to access GAE service. Just in case you want to move your app out
of GAE, you can still use the those.
You might want to read other alternatives also; Twig, Objectify recently
announced very cool features released...

Thanks.

On Sat, Mar 27, 2010 at 4:11 AM, jbdhl <jbirksd...@gmail.com> wrote:

> I got an answer to the below questions in this thread:
>
> http://groups.google.com/group/google-appengine/browse_thread/thread/dc2dcf2e71bc1055
> but was recommended to ask here also. Here goes...
>
> I try to figure out how easy it is to ruin/break the data in app
> engine's datastore by accident (using JDO). Assume that a class, say
> MyClass, has a number of "persistent" members, e.g.
>   ...
>   int a
>   int b
>   int c
>   ...
> and assume a number of MyClass objects have been stored in app
> engine's persistent storage. Now, what will happen if...
>
>   1) a new persistent member variable, int d, is *added* to MyClass?
> The old objects in datastore did not have this variable, so what will
> their d-value be when they are fetched from datastore?
>
>   2) a persistent member variable, int b, is *removed* from MyClass?
> I guess the b field will be removed from all stored MyClass objects?
> If not, what will happen if b is re-added at some later point in time?
> Will the stored MyClass objects now get their old b-value back?
>
>   3) the type of a persistent member variable is changed, e.g. if a
> is converted to a String? What will the value of a be when the already
> stored objects are fetched from datastore?
>
> By the way: the app engine docs focuses on JDO as the interface to the
> datastore. Is JDO particularly superior to the alternatives? (JPA,
> Objectify, Twig, SimpleDS, Slim3)
>
> --
> 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
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to