Has many ids are not on static context.

They belongs to a model instance.
Case sensitive column checking and updated_at column on insert.

Fixed case senstive column checking.
Inserted the updated_at column when inserting a record on a model where this
column exists.
Getting the belongs to value as a lower case key.
Getting the correct table name for has many ids.