I would like to write something like this in myBatis (using anotations instead of XML):
@Insert("INSERT INTO friendships (user_id, friend_id) VALUES (#{user.id}, {friend.id})")
public void insert(User user, User friend);
Is this possible? How exactly?
(Note, I would like to use Objects of type User for type-safty. I know that using int parameters and use #{1} and #{2} as placeholders would work)