You may want to take a look to the  Object Fields and Entity
Properties  section at the bottom of the Defining Data Classes
document here 
http://code.google.com/appengine/docs/java/datastore/dataclasses.html

Jorge Gonzalez


On Oct 26, 9:33 am, SweetHotDaddy <[email protected]> wrote:
> Suppose I have class A with fields
>
> @Persistent
> int id
>
> @Persistent
> String name
>
> @Persistent
> int age
>
> This class gets deployed (Version 1) to App Engine and data gets
> persisted to the datastore.
>
> I then modify class A by adding a new field.
>
> @Persistent
> address.
>
> and then deployed the new version (Version 2) to App Engine and data
> gets persisted to the datastore.
>
> Finally I modified class A again by removing the age field and I again
> deployed the new version (Version 3) to App Engine.
>
> Summary, the initial deployment, Version 1, had Class A. The second
> deployment, Version 2, I added a new field, address. The third
> deployment, Version 3, I deleted the 'age' field.
>
> In a typical database, when I add a new column, it typically defaults
> to null or 0 and when I delete a column, the data gets deleted. Then I
> update my SQL statements to take into account the deleted and new
> columns.
>
> My Question ... When I try to query the datastore in the third
> deployment, will I be able to get back the data which was stored in
> the first and second deployments?  Does DataNucleus know that fields
> were adding/deleted? What happens to those orphaned fields, for
> example Version 3 of my app got rid of the 'age' field but I'm
> assuming that data is still in the datastore?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to