Closed brunocascio closed 9 years ago
Reponse from loopback api:
[ { "name": "Receta 1", "description": "descripcion de la receta 1", "servings": 4, "preparing_time": 3847384, "cooking_time": 2328738, "createdAt": "2015-03-05T16:30:34.000Z", "userId": 1, "id": 1, "user": { "firstName": "Bruno", "lastName": "Cascio", "username": "brunocascio", "email": "foo@bar.com", "facebook_id": null, "city": null, "createdAt": "2015-03-05T16:30:34.000Z", "modifiedAt": "2015-03-05T16:30:34.000Z", "id": 1 }, "likes": [ { "recipeId": 1, "userId": 1 } ], "ingredients": [], "images": [] } ]
How to define java class for user?
user
public class Recipe extends Model { .... private User user; .... }
public class User extends Model { .... private String firstName; .... }
_NOTE: _ User model is a custom model, not loopback user.
In java, user throws a NullPointerException
NullPointerException
This is a duplicate of #62.
Reponse from loopback api:
How to define java class for
user
?_NOTE: _ User model is a custom model, not loopback user.
In java,
user
throws aNullPointerException