{"action":"opened","issue":{"url":"https://api.github.com/repos/VentureCraft/revisionable/issues/211","repository_url":"https://api.github.com/repos/VentureCraft/revisionable","labels_url":"https://api.github.com/repos/VentureCraft/revisionable/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/VentureCraft/revisionable/issues/211/comments","events_url":"https://api.github.com/repos/VentureCraft/revisionable/issues/211/events","html_url":"https://github.com/VentureCraft/revisionable/issues/211","id":137557025,"number":211,"title":"revisionable_id cannot be null","user":{"login":"schealex","id":3441348,"avatar_url":"https://avatars.githubusercontent.com/u/3441348?v=3","gravatar_id":"","url":"https://api.github.com/users/schealex","html_url":"https://github.com/schealex","followers_url":"https://api.github.com/users/schealex/followers","following_url":"https://api.github.com/users/schealex/following{/other_user}","gists_url":"https://api.github.com/users/schealex/gists{/gist_id}","starred_url":"https://api.github.com/users/schealex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schealex/subscriptions","organizations_url":"https://api.github.com/users/schealex/orgs","repos_url":"https://api.github.com/users/schealex/repos","events_url":"https://api.github.com/users/schealex/events{/privacy}","received_events_url":"https://api.github.com/users/schealex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-01T12:15:45Z","updated_at":"2016-03-01T12:15:45Z","closed_at":null,"body":"Hey there i have the following model:\r\n\r\n`class Usersettings extends cModel\r\n{\r\n    protected $table = 'user_settings';\r\n    protected $dates = ['deleted_at'];\r\n    protected $fillable = ['*'];\r\n    protected $primaryKey = 'id';\r\n    public $timestamps = true;\r\n    public $incrementing = false;\r\n\r\n    public function user()\r\n    {\r\n        return $this->belongsTo('App\\Models\\User');\r\n    }\r\n\r\n    public function emailaddresses()\r\n    {\r\n        return $this->hasMany('App\\Models\\Emailaddress');\r\n    }\r\n}`\r\n\r\ncModel class is:\r\n\r\n`class cModel extends EloquentModel\r\n{\r\n    use RevisionableTrait;\r\n    protected $revisionEnabled = true;\r\n    protected $revisionCreationsEnabled = true;\r\n}`\r\n\r\ni revisionable is working on other model that look exacly the same but with the usersettings it's throwing:\r\n\r\n`SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'revisionable_id' cannot be null (SQL: insert into `revisions` (`created_at`, `key`, `new_value`, `old_value`, `revisionable_id`, `revisionable_type`, `updated_at`, `user_id`) values (2016-03-01 12:11:14, created_at, 2016-03-01 12:11:14, , , App\\Models\\Usersettings, 2016-03-01 12:11:14, 1))`\r\n\r\non executing this:\r\n\r\n`        $user = Auth::user();\r\n        $settings = $user->usersettings()->get();\r\n\r\n        if (count($settings)<=0)\r\n            $settings = $user->usersettings()->create(Array(\r\n                'user' => $user\r\n            ));\r\n\r\n        dd($settings);`\r\n\r\nplease help me solve this\r\n"}}