Question about MobileBeans association

13 views
Skip to first unread message

deuteriof...@gmail.com

unread,
Feb 24, 2014, 3:19:31 PM2/24/14
to openmobs...@googlegroups.com
Hi.

I need to associate two MobileBeans of different Channels (like Ticket -> User). I looked in the sources and it appears that If i just declare a Java Association from one MobileBean to another, all the data of the association target will replicated in the device. If that is true, the best approach would be just declare a field to hold the other Bean's id?


Thanks in advance,

Deutério

Sohil Shah

unread,
Feb 24, 2014, 11:49:19 PM2/24/14
to openmobs...@googlegroups.com
Hi Deuterio,

It depends on what your data model looks like, but usually MobileBeans are fully self-contained with all the information they need inside the same Channel. Now, in your case, sometimes you need to associate one bean to another, and in that case, you can use some unique attribute of the child bean (the MobileBeanId is the best approach), within the containing (parent bean). 

I think in a nutshell your approach will work. Just remember on the device side, you cannot do cross channel querying of mobile beans, but what you can do is retrieve this bean id and lookup the corresponding bean from the other channel. It results in an extra query. The device side querying feature will be going through some evolution soon where you can do joins across channel data..Most likely the low-level schema will be documented, and then you can send queries against it via the MobileBean interface. The approach still needs to be designed and then implemented

Hope this answers your question

Thanks
Sohil


--
You received this message because you are subscribed to the Google Groups "OpenMobster Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmobster-us...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages