I want to save this object to database:
@Entity public class Device { private String name; private String type; private String ipAddress; private Device parent; @Id private String ID; private String ID_HZMO; @ElementCollection private List<Device> children; }
An object contains a list of other devices which are also type Device. My root device information are saved properly as well as devices in children list, but there is no information for that children devices and they don't have their children devices. I'm new to this object database so I don't know how to solve this problem.