maybe working
This commit is contained in:
@ -192,7 +192,7 @@ impl Merger {
|
||||
let mut entity_objects = std::collections::BTreeMap::new();
|
||||
let mut entity_arrays = std::collections::BTreeMap::new();
|
||||
|
||||
for (k, v) in obj.clone() {
|
||||
for (k, v) in obj {
|
||||
// Always retain system and unmapped core fields natively implicitly mapped to the Postgres tables
|
||||
if k == "id" || k == "type" || k == "created" {
|
||||
entity_fields.insert(k.clone(), v.clone());
|
||||
@ -333,20 +333,6 @@ impl Merger {
|
||||
entity_replaces = replaces;
|
||||
}
|
||||
|
||||
#[cfg(not(test))]
|
||||
if type_name == "contact" || type_name == "person" {
|
||||
pgrx::notice!("=== DEBUG {} PAYLOAD ===", type_name);
|
||||
pgrx::notice!("1. Incoming obj iteration: {:?}", obj);
|
||||
pgrx::notice!("2. Final mapped entity_fields: {:?}", entity_fields);
|
||||
pgrx::notice!(
|
||||
"3. TypeDef fields check: {:?}",
|
||||
type_def.fields.contains(&"source_id".to_string())
|
||||
);
|
||||
if !entity_fields.contains_key("source_id") {
|
||||
pgrx::notice!("CRITICAL ERROR: source_id was dropped during mapping loop!");
|
||||
}
|
||||
}
|
||||
|
||||
self.merge_entity_fields(
|
||||
entity_change_kind.as_deref().unwrap_or(""),
|
||||
&type_name,
|
||||
|
||||
Reference in New Issue
Block a user