Tweaks
This commit is contained in:
parent
5e0176ef1a
commit
49ed8b43c7
@ -45,12 +45,13 @@ where
|
||||
let columns_empty = self.columns.is_empty();
|
||||
for (idx, col) in <A::Entity as EntityTrait>::Column::iter().enumerate() {
|
||||
let av = am.take(col);
|
||||
let av_has_val = av.is_set() || av.is_unchanged();
|
||||
if columns_empty {
|
||||
self.columns.push(av.is_set());
|
||||
} else if self.columns[idx] != av.is_set() {
|
||||
self.columns.push(av_has_val);
|
||||
} else if self.columns[idx] != av_has_val {
|
||||
panic!("columns mismatch");
|
||||
}
|
||||
if av.is_set() || av.is_unchanged() {
|
||||
if av_has_val {
|
||||
columns.push(col);
|
||||
values.push(av.into_value());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user