How to load only ids from Many to Many mapping tables?
问题 In a Many to Many relation between two table with a Mapping table in between, how can I only load ids for the second entity. Following is the example to explain what I want to achieve here. Below is a sample schema create table user( id int PrimaryKey, name text ) create table pages ( id int PrimaryKey, page_name text ) create table user_page ( id_user int, id_page int, PrimaryKey (id_user, id_page) ) Note: there are additional columns in user and page tables which i have not included here