I'm new to the Google app, and in the middle of developing a test app, I had a problem. I create a key using the user's email id to save the user entity.
Key key = KeyFactory.createKey("email",email );
Now, having seen the data warehouse viewer, most of the key is the same as the last few alphabets of the key, they change even when I give the same email ID to generate the key.
Actually, I was hoping to get a custom object using a key using code.
Entity user = datastore.get(key);
But since the key does not match the previous one, I get noEntityFoundException
What I wanted to ask is why, when the input is the same, the generated key is different every time.
Also, every time I can get it to generate the same key every time so that I can get the object directly using that key?
For more details: here code Index.jsp is a welcome file. I create a user with an email id, for example: abc@example.com. This sends the form data to
com.siolabs.tambola.Createuser.java
Createuser server checks if an email id exists. If not, save the information in the data warehouse.
create user code here
Then, for login, I will send the information on the index.jsp page. It sends a request to com.siolabs.tambola.Login.java Servlet Servlet checks to see if an email id exists and if it sends a request to the home.jsp page.
login servlet code
The problem is that the login servlet never finds the email id as it is changed.
thanks