I've bumped on this question while having the same problem. Didn't find much resources about this so I decided to share what I eventually came up with. I've found some old post from 2005 (
http://www.systemmobile.com/?p=102) which gave me the idea that worked. Take a look at the following code sample which shows how to do it for composite keys:
Hope that this helps (at least to someone who bumps as I did).
Edit: I wrote an article with more details as reminder on my blog. Here it is
dbunit with composite primary keys