Jsonify one to many association with jackson: eg: SocialAccount 1--* SocialAccountFriend
@Entity
@Table(name = 'SocialAccount')
public class SocialAccount implements Serializable {
...
@JsonManagedReference
@OneToMany(mappedBy = 'socialAccount')
public List<SocialAccountFriend> friends;
...
}
@Entity
@Table(name = 'SocialAccountFriend')
public class SocialAccountFriend implements Serializable {
...
@JsonBackReference
@ManyToOne
@JoinColumn(name = 'soc_id')
public SocialAccount socialAccount;
...
}