Fixed the bug that only 'id' is primary key

For other primary keys other than the 'ID', did not work. 

I think the bug was fixed.