(mut self)
| 106 | A: ActiveModelTrait, |
| 107 | { |
| 108 | pub(crate) fn prepare(mut self) -> Self { |
| 109 | for key in <A::Entity as EntityTrait>::PrimaryKey::iter() { |
| 110 | let col = key.into_column(); |
| 111 | let av = self.model.get(col); |
| 112 | match av { |
| 113 | ActiveValue::Set(value) | ActiveValue::Unchanged(value) => { |
| 114 | self = self.filter(col.eq(value)); |
| 115 | } |
| 116 | ActiveValue::NotSet => panic!("PrimaryKey is not set"), |
| 117 | } |
| 118 | } |
| 119 | self |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | impl<A> QueryFilter for DeleteOne<A> |