Advertisement
Noah-Huppert

Scotch UserEmail Fetch V1

Nov 4th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. /*
  2.  * Creating the User and adding a UserEmail
  3.  */
  4. String testUserId = "userId";
  5.  
  6. User testUser = new User(testUserId, null);
  7. testUser.emails.add(new UserEmail("test@email.com"));
  8.  
  9. testUser.save();
  10.  
  11. /*
  12.  * Fetching the User
  13.  */
  14. User retrievedTestUser = User.find.where().eq("userId", testUserId).findUnique();
  15.  
  16. /*
  17.  * Result:
  18.  *  User data is fetched correctly, however UserEmail data for the user is not present
  19.  */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement