OpenBuildings/jam — pull request #40 by hkdobrev (2014-01-30 09:12:17+00:00)
Title: Do not change the foreign key when setting string

When you have a `belongsto` association and you set a numeric string directly
to the association key the foreign key is changed, because of the strict check
for fields. (See #39)

Example:

$post->blog = "5";
$post->changed("blog_id"); // returns TRUE

Normally you would not assign a string for an integer foreign key, but when
you submit forms this is what happens.

I have added tests for this use case and updated the unit tests for
`Jam_Association::primary_key()`.