0 | Ok, I got a small app, when registering a new acc, a user have to provide If I register a new user via our system (Ex: Tom12, Tom, 123456), then I can login with userNameTom12 & password: Now, login online Google Datastore & manually insert this record into it: Ex: Tom13, Tom, 654321 But this time I can not login with user Name So my question is that, does Google Datastore add some timestamps or something like that into the system that I can not log in? |
You can see the getUser function. Note that, the userNameis also the Key Name
public static User getUser(String userName){
Key k = KeyFactory.createKey(personKey, "User", userName);
try {
Entity userEntity=datastore.get(k);
//Entity userEntity=datastore.get(userName,personKey);
if(userEntity!=null){
User user=new User(userName);
setUserFromUserEntity(user, userEntity);
return user;
}
} catch (EntityNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}