Hi there.
Have you ever implemented cvs functionality with hibernate?
It's very easy to implement an object state history using interceptors, but what's about branches. Especially how to solve the relations to other objects in a many-to-many fashion?
My initial approach of my domain model looks like this:
Code:
public class Branche {
public long id;
public String displayName;
public String description;
public Branche() {
}
}
public classs DomainObject implements Cloneable {
public long id;
public Branche branche;
public String displayName;
pulbic Set relatedDomainObjects;
public Branche() {
relatedDomainObjects = new HashSet();
}
public Object clone() {
// @TODO Beeing on the ropes
// PLEASE HELP!!!
return this;
}
}
Please tell me your thought, 'cause I'm on the ropes.
Thx very much
Andi