I’ve been looking at RhoMobile over the last day or two and have achieved basic object transfer from our SQL Server to a Rhodes client app. I now need to understand a deeper level on RhoXX to understand how I proceed.
I am trying to understand how dependant objects are handled. However looking into this has raised a lot of unknowns.
So to solve my ‘problem’ I need to know how to sync a dependent object (I have a Job which has an FK to a customer). I have set the belongs_to in the job model to indicate the relationship, but cannot see how the correct subset of customer data will be downloaded to Rhodes.
This then opens up the wider unknowns of just how much data is moved around the system. My basic app is syncing ‘Jobs’ and my source adaptor filters by the logged on user so I just get (say) two jobs going down to the device. Now am I supposed to do this or should I be loading the entire Jobs table into the source adaptor and getting it all to the client and filtering there (probably not) – but then how do I get only the current customer entries round the system.
The params argument on Query is null (I guess this gets passed through from the client SyncEngine.do_sync argument of query_params) which is never set in the default application code. I’ve looked at search on the source adaptor but this has to be invoked. It would have expected the framework to deal with syncing just the data needed (using the belongs_to markup to decide what is needed) but can’t see how it works. Of course the alternative is that there is a disconnect (via redis) of the data from the source adaptor and the data sent to Rhodes on the device, but in that case how is that filtering performed and controlled.
So – does that mean I need all customers on my device to satisfy the two Jobs or ….
Docs on docs.rhomobile.com seem a little sparse - are there any more detailed anywhere ?
Thanks in advance