Skip to content

Fatal Exception at main #185

@kelvs-ricafort

Description

@kelvs-ricafort

Process: com.kelvsricafort101.wordpress.inventory, PID: 12237
java.lang.IllegalStateException: The query result was empty, but expected a single row to return a NON-NULL object of type <com.kelvsricafort101.wordpress.inventory.data.Item>.

pls change this from

@query("SELECT * FROM items WHERE id = :id")
fun getItem(id: Int): Flow

to

@query("SELECT * FROM items WHERE id = :id")
fun getItem(id: Int): Flow<Item?>

problem solved

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions