hi..
thanxs for the fast response!!!!
the point is, that it is not a real historizing. It is more a saving of all different versions of one object.
imagine:
You have a class like:
Code:
public class Process{
Integer ID;
Integer Version;
String Name;
}
and another one:
public class Node{
Integer NodeID;
Integer Version;
String Name;
Node [] next;
}
with those classes you can create a tree. I want to write an editor for this tree. when you switch to editormode, you can change the nodes in the process, and the properties of the process. when you then press save, i want to save the whole process/node thing in a new version. that means that the old process object and node objects are still there.
I only have two tables, that will be mapped to these two classes. in each table shall be all different objects with different versions.
I do not have a not historized object, therefore i wouldn't need a second table for historizing.
my problem is, each time i am saving an object of process, it overwrites the row of the table i created it with. but i want hibernate to insert a whole new row into the table... can i set some king o flag or constant that says "don not update, just insert a new one" ???
because of this, the version number should be part of the primary id (compositeID). how can i add a version number, that still has the functionality of a version number for hibernate, to a composite key ???
or do i have to create a whole new object each time i want to save a new one. still i would need the version number to be part of the ID !!!
how can i do this... ???
will read the texts you refered to... thanxs
Jens