     dynamic var owner: User?
     dynamic var members = RLMArray(objectClassName: User.className())
 
-    dynamic var conversation: Conversation?
+    var conversation: Conversation? {
+        let conversations = linkingObjectsOfClass("Conversation", forProperty: "withGroup") as! [Conversation]
+        return conversations.first
+    }
 }
 
 // MARK: Message

    dynamic var isBestfriend: Bool = false
    dynamic var bestfriendIndex: Int = 0

    dynamic var messages = RLMArray(objectClassName: Message.className())

    dynamic var conversation: Conversation?

    dynamic var ownedGroups = RLMArray(objectClassName: Group.className())
    dynamic var belongsToGroups = RLMArray(objectClassName: Group.className())
}

// MARK: Group


    dynamic var withFriend: User?
    dynamic var withGroup: Group?

    var messages: [Message] {
        return linkingObjectsOfClass("Message", forProperty: "conversation") as! [Message]
    }
}

