I have a problem with loading relations of relations. In my table ‘MetaData’, I have a column named ‘User’ which is a relation to the ‘Users’ table.
In the ‘Users’ table there is a column which is a relation to the table ‘UserRole’. When I now try to load entries from my ‘MetaData’ table, I get the user object in my entries, but not the ‘UserRole’ object in the ‘User’ object.
This worked definetly some time ago. Havent touched the code since month.
I tried to load the UserRole in different ways, as you can see below, but the UserRole object is never in the returned data.
var DbData = (await Backendless.Persistence.of('MetaData').find(Backendless.DataQueryBuilder.create().setWhereClause(WhereClause).setRelated(['User', 'UserRole', 'User.UserRole']).setRelationsDepth(3).setSortBy(["ID DESC"]).setPageSize(100).setOffset(0)));
I know that a relation depth of 2 should be enougth, but also 3 and above does not work…