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?
}
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.
Most helpful comment
Currently,
AWSDynamoDBObjectMapperdoes not map nested objects. It supports the dictionary data type, and you can manually map it to an object. Thanks.