Typo in the 2nd exemple, it should be lastName for User 

There's an error in the 2nd sample. It should be lastName and not name, as we search over the User model