can't save int

i dont know why is it happening but i cant save ay Int Value in Tables instead date , string booleans are working fine , my code:

my objectClass contains an entity named ‘total’ which is of int? type this is how i’m saving the object

    let tag = Tags()
    tag.objectId = id
    tag.total_reviews = selectedTagTotalReview = (selectedTagTotalReview.count) // problem occurring right here i tried with static  numbers too but still my table's column is empty 
    tag.detail = selectedTagDetail = selectedTag
    tag.image_url = selectedTagImageUrl
        response: { (result: AnyObject!) -> Void in

        error: { (fault: Fault!) -> Void in
            print("Server reported an error (2): \(fault)")

in backendless my table’s entity type is of INT

Try changing int? to int. Backendless Data Service doesn’t support optional values.

my bad working fine now but what with the string values ??? they are optional too…

I’m not aware of the details, maybe Vyacheslav Vdovichenko will provide you additional explanations later.

no problem , thanks again

For Swift data objects, the Bool, Int, Double and Float types must not be declared optional:

class TestNumerics : NSObject {
    var logic : Bool = false
    var count : Int = 0
    var real : Double = 0.0
    var afloat : Float = 0.0

String, NSData and custom class may be optional:

class Contact : NSObject {
    var objectId : String?
    var name : String?
    var age : Int = 0
    var phone : String?
    var title : String?
    var homeAddress : Address?
    var weight : Double = 0.0

Please see this doc.