Hello EveryBody:
I found a problem that i can not solve it, i hope everybody can helpme:
I have a Object that contains a "CompisteId".
Wu assume that object be called "ObjectX", and his CompiseteId is called like XId.
class ObjectX{
private Xid xid;
private String toUpdateOrSave;
}
class Xid{
private int id1;
private int id2;
private int id3;
public boolean equals(..){//all sentences correct, so i don`t write it}
public int hashcode(..){//all sentences correct, so i don`t write it}
}
Then, I get it from DataBase callin session.get(new Xid(1,2,3), ObjetX.class), I will get a ObjectX fine.
But when i call saveOrUpdate(objectX), it can`t "update", i really has seted to the attribute "toUpdateOrSave" a value "xxxxx"......
I don`t know why...
Can any one help me?
|