What is the easiest way to persist an object containing a org.dom4j.Document as a field? What I have been doing so far is writing a table for every class I want to persist, but they were all classes I created.
To make it concrete, suppose I want to persist the following:
Code:
public class DocumentWrapper {
String id;
org.dom4j.Document doc;
public String getId() { return id; }
public void setId(String id) { this.id = id; }
public org.dom4j.Document getDoc() { return doc; }
public void setDoc(org.dom4j.Document doc) { this.doc = doc; }
}
The class entry in my mapping file would be something like the following:
Code:
<class table="DocumentWrappers" name="DocumentWrapper">
<id type="string" name="id">
<column not-null="true" sql-type="char" name="ID" length="32"/>
<generator class="assigned"/>
</id>
<property name="doc" type="org.dom4j.Document">
<column sql-type="??" name="DOC" not-null="true"/>
</property>
</class>
What would the sql-type be? And do I also need a class element for the org.dom4j.Document class?
This is probably a really simple question, but I'm not seeing how to handle this. Thanks for any help.