java - Handle nested hibernate objects in a Foreign key relationship in REST -


i have 2 tables employee , address , below hibernate class,

public class employee {  private long id;  private address address; }  public class address {  private long id;  private employee employee;  private string street; } 

as see have forign key mapping in address class employee class. if query employee object , expose employee class

@xmlrootelement  public class employee { 

as rest service json response, face issue of nested object in json response.

i tried @jsonignore doesn't help.

is there way can differently? use jax-rs.

cheers!!


Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

c# - Populating Gridview inside Listview ItemTemplate On Web User Control from Code Behind -