Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は3つのエンティティA、B、Cを持っています。EntityA:プロパティ:Id、名前の関係:ABRelation(A->> B)
EntityB:プロパティ:Id、名前の関係:BARelation(B-> A)BCRelation(B->> C)
EntityC:RoleId CBRelation(C->> B)
次に、Cに含まれるRoleId=23を持つエンティティAからレコードをフェッチする必要があります。
早く助けていただけませんか。よろしくお願いします。
SELECT a.Id, a.Name, FROM EntityA a INNER JOIN EntityB b ON a.Id= b.EntityA_Id(foriegn key) JOIN EntityC as c ON b.EntityC_Id(foriegn key) = c.Id WHERE c.RoleId=23