我有以下情况:
我的课程如下:
Class ReferentialTable
Public Property ReferentialTableId as integer (PK)
Public Property Description as string
End class
Class MyOtherTable
Public Property MyOtherTableId as integer (PK)
Public Property OtherProperty as string
Public Property ReferentialTableId as integer
Public Property ReferentialTable as ReferentialTable
End class
如果我的表中有以下记录:
ReferentialTable
ID | Description
----+-------------
1 | Desc1
2 | Desc2
MyOtherTable
MyOtherTableId | OtherProperty | ReferentialTableId
---------------+---------------+--------------------
1 | Test | 1
如果我删除ReferentialTable
中的记录1,是否可以保留ReferentialTableId
的值MyOtherTable
?
如果不可能,我该如何处理这种情况?