Skip to content

Tag: android-room

How to query and filter relation entity in room database

For example: User: Post: Data if i use SELECT * FROM user i got the desire data(a user and all posts), but how can i filter the post for a specific type, like WHERE post.type = ‘sth’ is that possible? Answer but how can i filter the post for a specific type, It depends on exactly what you want to

Android Room Query returning null

I am trying to get the values from a DB via Room but it always returns null. It should retrieve the data from DB BalancesCat. Any help? Thanks! This is the DAO Repository ViewModel and the Fragment where I want to retrieve the data Answer This isn’t your problem, but I have to mention, your repository&#…

How to receive not duplicative rows using Room?

I have two related entities: Station Connector When I insert data, I fill up both entites and it seems kinda okay, but when I’m trying to receive stations with particular types of connectors it duplicates rows. For example, I have an object And if I want to filter stations only by one connector type I r…