Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Result UserTest(){
- String testUserId = "userId";
- String testUserEmail0 = "testEmail";
- User testUser = new User(testUserId, null);//Create and save test user
- testUser.emails.add(new UserEmail("test@email.com"));
- testUser.save();
- User retrievedTestUser = User.find.where().eq("userId", testUserId).findUnique();
- retrievedTestUser.emails.size();
- while(retrievedTestUser.emails.iterator().hasNext()){
- Logger.debug(retrievedTestUser.emails.iterator().next().email);
- }
- return ok(Json.toJson(retrievedTestUser));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement