diff --git a/backend/app/rag/knowledge_graph/graph_store/tidb_graph_store.py b/backend/app/rag/knowledge_graph/graph_store/tidb_graph_store.py index 04c3a678..a50c35c5 100644 --- a/backend/app/rag/knowledge_graph/graph_store/tidb_graph_store.py +++ b/backend/app/rag/knowledge_graph/graph_store/tidb_graph_store.py @@ -359,6 +359,8 @@ def get_or_create_entity(self, entity: Entity, commit: bool = True) -> SQLModel: db_obj.meta_vec = get_entity_metadata_embedding( db_obj.meta, self._embed_model ) + + self._session.add(db_obj) if commit: self._session.commit() self._session.refresh(db_obj)