I am trying to implement the below script, but I ran into a problem
class CommentsModel: Object { dynamic var commentId = "" dynamic var ownerId: UserModel? dynamic var treeLevel = 0 dynamic var message = "" dynamic var modifiedTs = NSDate() dynamic var createdTs = NSDate()
I have a comment model that has optional properties in which childComments is a list of the same comment model classes. In this case, when I declare dynamic var childComments = List<CommentsModel>()
indicates that a property cannot be marked as dynamic because its type cannot be represented in Objective-C.
Please help me how to reach my requirement
source share