Search code examples
androidrealmrealm-mobile-platform

how to make query in specific table in default.relam that contains many tables in android


I'm a beginner in realm in android and I want to make table name detection in my query.

this is my code

realm.where(TafseerQuraanModel.class).findAll();


Solution

  • realm.where(TafseerQuraanModel.class)
    

    This line already returns a Query that is being executed for table TafseerQuaanModel.

    So things like this work:

    realm.where(TafseerQuraanModel.class)
            .equalTo("name", "blah")
         .findAllSorted("name", Sort.ASCENDING);
    

    For more information on queries, read the official documentation.