Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4709 Lượt xem

Hello,


I am trying to create a one to one relationship between two of my models (A and B). This is to avoid that multiple people using the system accidentally assign duplicate matches (i.e. when A.id1 is associated with B.id1, none of these IDs can be used in other matches).

This seems like quite an intuitive use case, but everywhere I see that the One2one relationship has actually been deprecated for a long time, and I keep finding hacks to simulate this behaviour.

I'm trying to understand why this is the case, as I am sure I am missing some important detail. If someone could advise, it would be much appreciated.

Thanks


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 23
1301
3
thg 4 20
3517
1
thg 2 20
2254
0
thg 10 18
3901
1
thg 3 15
4295