Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Testing the relationships between Users and UserEmails
- */
- public class UserEmailTest {
- /**
- * Tests creating a new User and then adding a UserEmail
- * @param args Not used
- */
- public static main(String[] args){
- User user = new User("userId", null);
- user.emails.add(new UserEmail("foo@bazz.com"));
- user.save();
- /* Result
- When I look at the database(In phpMyAdmin) I can see that a new user has been created with the Id of "userId"
- However when I look in the user_email table there are no emails
- */
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement