Skip to content

Instantly share code, notes, and snippets.

Danil danilValeev

Block or report user

Report or block danilValeev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danilValeev
danilValeev / ObjectMapper operator for Realm.md
Last active May 31, 2019
Easy mapping Realm's List and RealmOptional with ObjectMapper
View ObjectMapper operator for Realm.md

This code helps using ObjectMapper with RealmSwift.

RealmSwift uses List<T> collection for "to many" relashionships and RealmOptional<T> for optional primitive types, but ObjectMapper can't map directly to List<T> and RealmOptional<T>.

With this operators you can properly define RealmSwift's relashionships and optional properties and use <- operator to map them.

Example

import Foundation
You can’t perform that action at this time.