Hi,
for saving, I am using a simple Pojo:
Code:
@Entity
public class MyClass implements Serializable {
private static final long serialVersionUID = -1662397053835259063L;
@Id
Long id;
@ManyToOne
@JoinColumn(name="PARENT_ID",unique=true)
private MyClass parent;
For retrieving the data I'm mostly writing a selectable recursive stored procedure which reads the values from the tree and sorts them in a more "displayable" kind with a level and a position field. With XML I would display them with the tag names in the first field and the value of the field in the second etc. fields.
Chris