My first "real" test of hibernate has succeeded, but test #2 hasn't. I'm sure it's something I'm not understanding, but if someone could point it out, I'd sure appreciate it.
The code is essentially this:
Code:
HibTest x = new HibTest();
x.setStringVal("some string");
x.setFloatVal(10.0F);
Session sess = myFactory.openSession();
sess.saveOrUpdate(x); // this works, spits out sql, shows up in the db, etc
// after this, x.id is correctly set, too
x.setStringVal("new value");
sess.saveOrUpdate(x); // this does nothing, seemingly
sess.close();
// At this point, I have "some string" and 10 in the database for this row.
Pointers to my errors greatly appreciated. Hibernate 2.1, MySql 4.x.