Skip to content
Advertisement

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

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 receive one row with this

Advertisement