2012-10-14から1日間の記事一覧
次のような中間テーブルを挟むhas_manyなDB構造の場合 users table id email 1 test1@gmail.com 2 test2@gmail.com 3 test3@gmail.com 4 test4@gmail.com 5 test5@gmail.com users_services table id user_id service_id role 1 3 2 role1 2 2 1 role2 3 3 3…
次のような中間テーブルを挟むhas_manyなDB構造の場合 users table id email 1 test1@gmail.com 2 test2@gmail.com 3 test3@gmail.com 4 test4@gmail.com 5 test5@gmail.com users_services table id user_id service_id role 1 3 2 role1 2 2 1 role2 3 3 3…