Backendless + realm - problem with storing arrays

Hello ! I am new in backendless.
I need to make a simple table with categories and few items that belong to categories
I have a problem with getting data from backendless, because i make class that must be compatible with backendless and Realm.
The problem is getting array from backendless:

class Category: Object {
dynamic var objectId = ""
dynamic var name = ""
dynamic var listNumber = 0
dynamic var imageName = ""
dynamic var image: NSData? = nil
dynamic var created: NSDate?
dynamic var updated: NSDate?
var dishes = List&lt;Dish&gt;() // <- my problem

Problem with ‘dishes’.
Backendless manual says that i should do like this

var locations : [Location] = []

but Realm says that it not supports NSArray, and will work with List<Type> Format,

dynamic var dishes: [Dish] = [] // Terminating app due to uncaught exception 'RLMException', reason: ''NSArray' is not supported as an RLMObject property. All properties must be primitives, NSString, NSDate, NSData, RLMArray, or subclasses of RLMObject. See for more information.'

But when i get array from backendless , description of array looks like:

▿ [1] : Category {
objectId = 52E0D354-F1B1-2F64-FFD8-B4129ED0DA00;
name = Паста;
listNumber = 2;
imageName = pasta.png;
image = &lt;(null) &mdash; 0 total bytes&gt;;
created = 2016-03-12 17:07:35 +0000;
updated = 2016-03-12 17:34:36 +0000;
dishes = (

There is no dishes.

What i should do ? Please help.

I found a topic with the same problem

but there is no answer what to do</img>

Hi Alexandr,

Please, show the code of your request to retrieve the data.

Hello Sergey! :slight_smile: That’s my code:

 @IBAction func loadBackendCategories(sender: AnyObject) {
            let dataStore =
            var error: Fault?
             let result = dataStore.findFault(&error)
            if error == nil {
                let categories = result.getCurrentPage() as! [Category]
                for var m = 0; m < categories.count; m++ {
                  //  print(categories[m].dishes.count)
            else {
                print("Server reported an error: \(error)")

Backendless does not return related objects on “find” request by default. This is done to decrease the size of response.
So you should either set “autoload” in your Data Console - which will change the default behaviour and always retrieve this relation, or indicate that you want to load some relations in Query Options. See the example in the docs: