You can create a class for the user_role table ...
Code:
public class UserRole {
User user;
Role role;
boolean default;
.....
}
<class name="User" table="user">
....
....
<set name="roles" table="user_role" lazy="true">
<key>
<column name="user_id" not-null="true"/>
</key>
<one-to-many class="UserRole"/>
</set>
</class>
<class name="UserRole" table="user_role">
<composite-id>
<key-many-to-one name="user" class="User" column="user_id"/>
<key-many-to-one name="role" class="Role" column="role_id"/>
</composite-id>
<property name="default"/>
</class>
I think that exists another way to implement but I use this.