我買了一個表結果的數據庫,它看起來像這樣: 表結果: resultId, resultValue, patientId (its a Foreign key of the table Patient), scriptId(Foreign key of ScriptMW), userId(Foreign key of User) ,我忘了該表的用戶也已經在它的外鍵,從patientId 所以1用戶有
這是我的USER實體,USER_GROUP是與GROUP的關係表。 如何獲取所有用戶groupid =? @Entity
@Table(name="USER")
public class User implements Serializable {
@Id Long userId;
@ManyToOne
@JoinTable(name = "
我希望能夠爲用戶分配車輛註冊,並且當用戶登錄到網站時,他們的主頁應該有他們擁有的車輛註冊表列表。 但是我不能讓模型類過濾外鍵。 views.py @login_required
def home(request):
# This is the basic user landing Page
veh_list = Vehicle.objects.filter(UserProfi
我的用戶表是 @Entity
@Table(name = "PERSON")
public class User implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "ID")
@GeneratedValue(stra