Skip to content

dao.queryForId() returns null even though row exists #148

@kenyee

Description

@kenyee

Hoping someone has seen this behavior and might be able to give me a clue. Google search and stackoverflow and chatgpt didn't find anything.

I'm running OrmLite for Android 6.1.
I turned on sql logging and see this:

query-for-id using 'SELECT * FROM `activity` WHERE `id` = ?' and 1 args, got no results
query-for-id arguments: [8158845]

But using Android Studio's database inspector, I see that the row is there.
I also pulled the database and ran the sqlite3 CLI against it and when I do
sqlite> select * from activity where id = 8158845
I do see data.
The app also has the same behavior on app start...I thought there might be some sort of issue w/ the data not being written to sqlite yet (no transactions are used).

I'm puzzled...this is not how I understand an ORM to work 🤔

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