Skip to content

Instantly share code, notes, and snippets.

@amit-bhandari
Created April 14, 2019 15:33
Show Gist options
  • Save amit-bhandari/15e4e2e36e37628cc53d758147e352a2 to your computer and use it in GitHub Desktop.
Save amit-bhandari/15e4e2e36e37628cc53d758147e352a2 to your computer and use it in GitHub Desktop.
@Entity
public class User {
@PrimaryKey
private int uId;
private String uName;
private ArrayList<String> uPets = new ArrayList<>();
public User() {}
public User(int id, String name, List<String> pets){
this.uId = id;
this.uName = name;
this.uPets.addAll(pets);
};
//getters setters removed for brevity
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment