I have to model `ConversationStatistic`, `Conversation` . I need `Conversation` has\_one `ConversationStatistic` . 

`conversations tables`

```
  id 
  t.string "conversation_uid", null: false
  t.boolean "open"
  t.datetime "created_at", precision: 6, null: false
  t.datetime "updated_at", precision: 6, null: false
  t.integer "company_id", null: false

```

`conversation_messages tables`

```
  id 
  t.string "conversation_uid"
  t.jsonb "messages"
  t.integer "count_conversations_parts"
  t.datetime "created_at", precision: 6, null: false
  t.datetime "updated_at", precision: 6, null: false

```

```
class ConversationMessage < ApplicationRecord
  # validates of conversation_uid must exist & unique
  validates :conversation_uid, presence: true, uniqueness: true
  # # relations
  belongs_to :conversation, foreign_key: :conversation_uid
end

```

```
class Conversation < ApplicationRecord

  # validates of conversation_uid must exist & unique
  validates :conversation_uid, presence: true, uniqueness: true
  # validates of intercom_key must exist & unique
  validates :contact_uid, presence: true

  has_one :conversation_message, foreign_key: :conversation_uid
end

```

when test in rails console `Conversation.last.conversation_message` return nil although `conversation_uid` in `Conversation` exist in `conversation_message`