0

I have a object like such:

public class MyObject {       
    private Date date;
    private Map<String, Object> items;

    //default constructor
    //getters and setters
}

In the items map I can save primitive objects (like strings, doubles etc) and also lists as values. I am able to save the object without any issues using a OObjectDatabaseTx.

However when I get the object back and try and detach all, it only detaches the objects in the items map that isn't a list. For lists it keeps them as OTrackedList. This causes a problem when I try to send the object via a rest API as JAXB doesn't know what a OTrackedList is. I get the following error:

JAXBException occurred : class com.orientechnologies.orient.core.db.record.OTrackedList nor any of its super class is known to this context.. class com.orientechnologies.orient.core.db.record.OTrackedList nor any of its super class is known to this context..

Can anyone help me with this? I am running out of ideas and seriously thinking about switching to another document database.

jrtc27
  • 8,496
  • 3
  • 36
  • 68
rodmen88
  • 11
  • 2

1 Answers1

0

JAXBException indicates you have an JAXB problem, not a OrientDB problem. Look for any of the questions about your exception, like this one

Community
  • 1
  • 1
rmuller
  • 12,062
  • 4
  • 64
  • 92
  • Thanks for the response. I understand that JAXB whats to convert the OTrackedList and is unable to because it doesn't known the context of OTrackedList. However that's not my issue. My issue is that even after a detachAll call from the OObjectDatabaseTx, I am not getting back a pure List object but rather an OTrackedList. And if I understand the purpose of the detach function, this shouldn't be the case. That's really what I need help with; detaching a List from a OTrackedList – rodmen88 Feb 10 '15 at 08:53