I want to save severel Roles for a User. For that purpose I have created a Jointable user2role,which assigns every user id an role id. So far everything works finely. Additionally, I want to save some columns in the join table, for example the the last last_modifying_date (see table defintion below). I dont want to create an additional controller for user2role. I want to solve it by extending the current mapping definiton. Thank you for your help!
The mapping file of User (User.hbm.xml) contains following definition:
    <set name="roles" cascade="all" table="user2role" lazy="false">
        <key column="userID" />
        <many-to-many class="domain.Role"
            column="roleID" />
    </set>
The Table user2role looks like:
    CREATE TABLE `user2role` (
  `userID` int(11) NOT NULL DEFAULT '0',
  `roleID` int(11) NOT NULL DEFAULT '0',
  `modifying_user_db` varchar(50) DEFAULT NULL,
  `modifying_user_appl` varchar(50) DEFAULT NULL,
  `last_modifying_date` datetime DEFAULT NULL,
  PRIMARY KEY (`userID`,`roleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Verknüpfung User zu Berechtigungsrolle';
 
     
    