android - how to query for sub object in one of the table in db4o? -


i implementing app on android , same using db4o.v in 1 table/object storing list category. in class1 have 2 members name , id....

i have fetch records comparing class1.name..how this?

i tried using query.descend("name").constrain(value) , query.descend("class1.name").constrain(value), did not fetch records...

can 1 me please?

i found answer this...

made 1 common id both objects tried first sub class records sub class , using id of sub class got results required class.

read category object matches required name...using object id read class1 object..like,

list<category> categories =  dbservice.getresultsbyid(category.class, "name", category); if (categories != null && categories.size() > 0) {      (category testcategory : categories) {         return dbservice.getresultsbyid(class1.class, "id", testcategory.id);     } } 

this working.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -