-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codemsft.ext.vectordataRelated to Microsoft.Extensions.VectorDataRelated to Microsoft.Extensions.VectorData
Milestone
Description
Our upsert APIs allow returning keys/IDs which are generated in the vector store, but we don't actually implement that for connectors yet. We're also lacking a way for users to indicate that they want
- Add IsAutoGenerated flag on VectorStoreRecordKeyProperty.
- For the attribute, we could add it, or there's the .NET
[DatabaseGenerated(DatabaseGeneratedOption.Identity)](EF recognizes this, so do some other layers). Though the naming (identity) isn't ideal (it's SQL Server-specific).
- For the attribute, we could add it, or there's the .NET
- Open design question: when a key property is configured as auto-generated, is it still possible for users to provide a value?
- This opens up the question of how we determine whether the user has set the value or not. For this case, EF checks if the key property has the default value, and assumes it's "unset" if so; this works relatively well, as relational databases typically start from 1 for numbers, empty GUIDs (all-zeros) are also a useful sentinel value, etc.
- But we can always start by not supporting this and add it later (i.e. if a key property is configured as auto-generated, it cannot be set).
See previous conversation in #10692.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codemsft.ext.vectordataRelated to Microsoft.Extensions.VectorDataRelated to Microsoft.Extensions.VectorData
Type
Projects
Status
Sprint: Done