I had the same problem.
You just have to create the middle entity and do two one-to-many relations.
If you checked the statements it generates to update a many-to-many relation, you wouldn't use it anyways.
When you add a new item to a many-to-many relation the relation in first loaded (I think this generates one select statement), then you update that relation and do a commit. This things happen:
Delete is performed for every object in the array (maybe it's one delete statement or N delete statements, I don't remember)
All objects are reinserted into the database (N insert statements + the new one).
If you make a lot of updates to the many-to-many relation then many-to-many mapping is not for you. You can use many-to-many on object's that don't change or don't change very often (because of all the deletes and reinserts).
You should make 3 objects (let's say User, Post, Vote - which is a USER_POST middle table).
Create primary keys for all of those tables (even for USER_POST). Create a surrogate key, and make a constraint for USER_ID, POST_ID to be uniqe for USER_POST table. Map it as normal one-to-many, many-to-one (parent-child, child-parent) relations and that's it.