Added primary_key support for has_many.

Also tested foreign_key support explicitly.