Sugar ORM listAll() not showing any data
<p>I'm trying to get data from databse in a listview as shown below.</p>

<pre><code>  long count = UserTableSugar.count(UserTableSugar.class);
    if(count&gt;0)
    {
        UserTableSugar.listAll(UserTableSugar.class);
        List&lt;UserTableSugar&gt; userTable = UserTableSugar.listAll(UserTableSugar.class);
        CustomAdapterListview madapter = new CustomAdapterListview(getApplicationContext(),userTable);
        listView.setAdapter(madapter);
    }
</code></pre>

<p>but,the data won't show up. On debugging, the value of <em>count</em> is 2 (there are two records in table). But the size of list <em>userTable</em> is shown 0.</p>

<p><strong>SOLVED</strong> : Adding empty constructor of the model class did the trick.</p>