我想要一個父級班(Group),其中任何數量的用戶都可以加入。我想顯示用戶尚不在的所有組。我如何對這些數據建模,以及如何查詢?對不起,沒有提供任何代碼,但我根本不知道。 編輯: 在SQL中,這將通過用戶表,組表和GroupUser交叉表完成。和查詢會去: select *
from Group
where Group.ID not in
(
select GroupID
from Grou
我已經開始研究數據存儲,並且發現可以通過此方法獲取實例(),方法get()可以在db和Model類中使用。但它們之間有什麼區別,我不覺得我的問題是 1. how its working in background to get the Instance of an Model
2. how the performance wise of use db.get() and Model.get()