         builder += "}"
         return builder
     }
-    
-    
+
+
     fileprivate func generateWrappers(_ entity: StructDeclaration, variables: [InstanceVariable]) -> CodeBuilder {
         var builder = CodeBuilder()
         var first = true

        builder += "}"
        return builder
    }
    
    
    fileprivate func generateManagedObject(_ entity: StructDeclaration, variables: [InstanceVariable]) -> CodeBuilder {
        var builder = CodeBuilder()
        let accessibility = entity.accessibility.sourceName

            }
            builder += "\(entity.accessibility.sourceName) class \(getWrapperName(entity.name, variable.name)): RealmSwift.Object, Torch.ValueTypeWrapper {"
            if isValueConvertible(variable) {
                builder.nest("@objc dynamic var value = \(variable.rawType).getDefaultValue().toValue()")
            } else {
                 builder.nest("@objc dynamic var value = \(variable.rawType)()")
            }
            builder += "}"
        }
        return builder
    }


    fileprivate func isTorchEntity(_ variable: InstanceVariable) -> Bool {
        return allEntities.contains(variable.rawType)
    }


    fileprivate func isId(_ variable: InstanceVariable) -> Bool {
        return variable.name == "id"
    }


    fileprivate func isArrayWithValues(_ variable: InstanceVariable) -> Bool {
        return variable.isArray && !isTorchEntity(variable)
    }


    fileprivate func isRealmOptional(_ variable: InstanceVariable) -> Bool {
        return variable.isOptional && Generator.RealmOptionalTypes.contains(variable.rawType)
    }


    fileprivate func isValueConvertible(_ variable: InstanceVariable) -> Bool {
        return !Generator.ValueTypes.contains(variable.rawType) && !isTorchEntity(variable)
    }


    fileprivate func getManagedObjectName(_ entityName: String) -> String {
        return "Torch_" + entityName
    }


    fileprivate func getManagedObjectType(_ entityName: String) -> String {
        return entityName + ".ManagedObjectType"
    }


    fileprivate func getWrapperName(_ entityName: String, _ variableName: String) -> String {
        return getManagedObjectName(entityName) + "_" + variableName
    }


    fileprivate func getIsNilName(_ variableName: String) -> String {
        return getPrefixedPropertyName(variableName) + "_isNil"
    }


    fileprivate func getPrefixedPropertyName(_ variableName: String) -> String {
        return "torch_\(variableName)"
    }
