Skip to content

How are column names determined? #10

@bkjbkjbnkj687698698

Description

@bkjbkjbnkj687698698

i am having issues using Contraints.If i don't use contraints data loads perfectly.But if i try running following query-

Constraint constraint = new Constraint().orderBy("noOfSeen");
List cached = adapter.findAll(database,constraint);

where noOfSeen is the variable of object class.I assumed that the table in [persistence][2] creates column name according to the variable name in object class.
but i get following exception

android.database.sqlite.SQLiteException: no such column: noOfSeen (code 1): , while compiling: SELECT * FROM videos ORDER BY noOfSeen

How are column names determined while creating table through this wrapper.How can i use following query of normal database in this wrapper?

"SELECT  * FROM " + TABLE_VIDEO +" where " + KEY_TYPE + "='popular'"+ " order by " + KEY_NOSEEN + " DESC "

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions