It doesn't look like onSave gets called for userxref below. Note that userxref is a composite-element used for extra cols in a many-to-many. Should onSave get called? Or must I loop thru the collection (roles) myself, knowing that if this user is new then all the UserRole's are by default new?
roleA = new Role( new Long (1), "Role A");
roleB = new Role( new Long (2), "Role B");
user = new AppUser( new Long(100), "Jeff Boring ");
user.setEmailAddr( "
[email protected]");
user.setUserId( "jwboring");
user.setPassword( "password");
userxref = new UserRole("Serving as role A on project", roleA, user );
userxref.setUserId("JWB");
userxref.setTransCode("add");
user.getRoles().add( userxref );
sess.save( roleA );
sess.save( roleB );
sess.save( user );