我把这个映射存储在一个customer变量中
%{
billing_contact: #Ecto.Association.NotLoaded<association:billing_contact is not loaded>,
billing_contact_id: 305,
business_contact: #Ecto.Association.NotLoaded<association:business_contact is not loaded>,
business_contact_id: nil,
disabled_message: "",
end_date: nil,
id: 6851,
is_disabled: false,
name: "test",
start_date: #DateTime<2018-08-17 12:56:50.498078Z>,
technical_contact: #Ecto.Association.NotLoaded<association:technical_contact is not loaded>,
technical_contact_id: nil,
users: #Ecto.Association.NotLoaded<association :users is not loaded>
}
key value pairs where value is Ecto.Association.NotLoaded
. 我阅读了地图文档,但找不到任何函数来删除基于值的键值
我想这么做
dynamically
. 所以当有地图进来的时候。它会自动删除值为外部关联的所有键值对
谢谢