Fix more bugs
This commit is contained in:
1 parent
60dae212ec
commit
42c38d55e1
9 files changed
+24
-18
No files matched your search
@@ -457,14 +457,15 @@ impl<T: EntityData + Clone, D: DbLayer<T>> Repository<T, D> for DataRepositoryIn
|
||||
.write_entity(data, &self.connection.lock())?;
|
||||
} else {
|
||||
let index = fast_position_of(self.temporal.as_slice(), entity).unwrap();
|
||||
let mut data = self.temporal.remove(index);
|
||||
let data = &mut self.temporal[index];
|
||||
self.data_layer
|
||||
.add_entity(&mut data, &self.connection.lock())?;
|
||||
.add_entity(data, &self.connection.lock())?;
|
||||
entity.set_real(true);
|
||||
entity.id = data.id();
|
||||
entity.set_index(self.cache.len());
|
||||
self.query_manger.handle_save(original_state, entity, &data);
|
||||
|
||||
let data = self.temporal.remove(index);
|
||||
self.cache.push(data);
|
||||
self.shifts += 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user