Aws-sdk-ios: Support for nested mapping in DynamoDB Object Mapper

Created on 2 Mar 2016  路  3Comments  路  Source: aws-amplify/aws-sdk-ios

I have a Model like this

class AccidentReport: AWSDynamoDBObjectModel, AWSDynamoDBModeling  {

    var deviceID: String?
    var reportID: String?
    var driverInfo: Array<AnyObject>?

    class func dynamoDBTableName() -> String! {
        return "ReportAccident"
    }

    class func hashKeyAttribute() -> String! {
        return "deviceID"
    }



    //MARK: NSObjectProtocol hack
    override func isEqual(object: AnyObject?) -> Bool {
        return super.isEqual(object)
    }

    override func `self`() -> Self {
        return self
    }
}

is there anyway variable driverInfo of the above class will automatically map to class DriverInfo ?

class DriverInfo {
    var driverLicenseInfo: LicenseInfo?
    var emailID: String?
    var insuranceInfo: InsuranceInfo?
    var phoneNumber: String?
}

is there anyway variable driverLicenseInfo of the above class will automatically map to class LicenseInfo ?

class LicenseInfo {
    var dob: String?
    var expiration: String?
    var firstName: String?
    var licenseNo: String?
}
closing-soon-if-no-response feature request

Most helpful comment

Currently, AWSDynamoDBObjectMapper does not map nested objects. It supports the dictionary data type, and you can manually map it to an object. Thanks.

All 3 comments

Currently, AWSDynamoDBObjectMapper does not map nested objects. It supports the dictionary data type, and you can manually map it to an object. Thanks.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

victorleungtw picture victorleungtw  路  4Comments

joelk picture joelk  路  5Comments

ChrisInspect picture ChrisInspect  路  4Comments

pawlowskialex picture pawlowskialex  路  4Comments

kshrikant picture kshrikant  路  4Comments