<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 9/11/2014 2:20 PM, Ramon Pires da
Silva wrote:<br>
</div>
<blockquote
cite="mid:CAEJ5yV07yCov1ffBGG-L+iR4KRQ2FWQwY6jke938PURuZbL_Fg@mail.gmail.com"
type="cite">
<div dir="ltr"><span
style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">the
Data Store</span><span
style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px"> with
SQLStore for android sample at github are really simple, i
need some example how to work with many-to-many
relationship,or some tip about it.</span><br>
</div>
</blockquote>
SQLStore really doesn't support many-to-many style relationships*.
If you need a full ORM with proxies, lazy loading, etc then that is
a different problem. If you can get by with Key:Value mappings and
some simple querying then we might be able to help.<br>
<br>
For each pair of relationships you can create a mapping object and
use three SQLStores. Two stores would be for your objects and the
third would be a for the object which manages the mapping
(essentially a RecordId and a pair of Ids for the other two
objects). Then I would wrap these three stores in a ContentProvider
which will manage assembling and disassembling your objects when the
app queries them.<br>
<br>
*SQLStore works by serializing your object to JSON and then storing
each property in a table. The table schema is (from my memory) is
the fully qualified property name, the property value, a row id, and
the id of the parent row. It is really good for storing objects
which are basically unidirectional graphs with a unique key. It is
very slow at doing any other querying, and it can't handle complex
graphs (Many to many, cycles, etc). It can handle nested
collections however.<br>
<br>
<blockquote
cite="mid:CAEJ5yV07yCov1ffBGG-L+iR4KRQ2FWQwY6jke938PURuZbL_Fg@mail.gmail.com"
type="cite">
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Aerogear-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/aerogear-users">https://lists.jboss.org/mailman/listinfo/aerogear-users</a>
</pre>
</blockquote>
<br>
</body>
</html>