我有两个集合,即Employees和Departments。因为我使用has_many和belongs_to从部门引用了employee集合的department_id字段 include Mongoid::Document field :age, type: Integer field :manager_id, type: Integer attr
我使用SQL Server2012,我的表名为"tableX",它有color_id,还有第二个表"colortable1color_id“= key is color_id指向colortable1,colortable1( color_id is 1-100)拆分之后,tableX将找不到从colortable1中删除的ids,我需要以某种方式设置逻辑:
if id is 1-100 then color_id i