Add support for Kohana primary key method
Merge pull request #21 from scottrobertson/fix-undefined-id and fixed conflicts