Hi, first at all i must say that i come from the relational database
world. I have a few doubts about how datastore works being schemaless.

For example, let's say that i have a presistent class User that haves
only 3 propertys: id (int), username (String) and password (String).

So, i deploy my application on appengine and create a user with
username = "ian" and password = "ian123".

And then i make a query, searching all the users, and i get the user
"ian".

Ok, until here i understand this perfect.

DOUBT 1: What happens, if i make a change to the User class and, for
example, i add to the class the property sex (String). Then i deploy
my app again in the appengine.

Now i create a new user with this values username = "mcculloch",
password = "mc123" and sex = "M" and persist the user.

I think that if i make the query to get all the useri will get the 2
users, and the property sex to the user "ian" will be null. Is that
correct?

DOUBT 2: Now i realize that i don't want to store the sex of the user,
and also i think that i don't want the id property as an integer. Now
i want that the username will be the key of the class, so i remove the
id property and add the annotation to make the username property the
Primary Key of the entity.

Then i deploy the app on appengine, create a new user with this
values: username = "eric", password = "eric123".

What does happen now i query all the users, will i get the two users?

DOUBT 3: Let's say that i realize that i really need the sex property
for the users, so i add again the sex property to the User class and
deploy again to the datastore.

If i query for all the users? What datastore will return to me? All
the users? Only those that the sex is not null?

DOUBT 4: Finally, what happens if i want to have 2 enviroments of my
app? I have to create 2 apps on appengine? If this is the way, let's
supose that in my production enviroment i have a lot of data and i
want to make a copy of that data to my testing app so i can make
testing with good data. Can i copy that data from one app to another?
How could i?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to