You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! First of all, this is an awesome project. Thank you very much for making it available.
I would like to know if ef-core scaffolding is supported or planned to be supported. I'm trying to scaffold a table with a halfvec(3072) column and it's not working. I have the following table:
create table "memory-default"
(
_pk textnot nullprimary key,
embedding halfvec(3072),
labels text[] default '{}'::text[] not null,
chunk text default ''::textnot null,
extras jsonb default '{}'::jsonb not null,
my_field1 text default ''::text,
_update timestamp with time zone default CURRENT_TIMESTAMP
);
altertable"memory-default"
owner to postgres;
create index "memory-default_labels_idx"on"memory-default" using gin (labels);
create index "memory-default_embedding_idx"on"memory-default" using hnsw (embedding halfvec_cosine_ops);
Build started...
Build succeeded.
Could not load database collations.
Could not find type mapping for column 'public.memory-default.embedding' with data type 'halfvec(3072)'. Skipping column.
Unable to scaffold the index 'memory-default_embedding_idx'. The following columns could not be scaffolded: embedding.
The generated output only goes as far as the following in the DBContext:
Btw, I'm using the NodaTime library for the Instant type. In the case of the Instant type NodaTime was able to replace the timestamp with time zone type from sql.
Maybe there is a way to implement proper mapping as well for scaffolding as NodaTime has?
The text was updated successfully, but these errors were encountered:
Thanks @roji! 🙏 I have no background at the moment at this level of programming extensions/plugins with dotnet and efcore but I'm really interested myself to understand how this is going to be implemented. Looking forward to this.
Hi! First of all, this is an awesome project. Thank you very much for making it available.
I would like to know if ef-core scaffolding is supported or planned to be supported. I'm trying to scaffold a table with a
halfvec(3072)
column and it's not working. I have the following table:I tried executing the following command:
dotnet ef dbcontext scaffold \ --project src/MyProject.Core/MyProject.Core.csproj \ --startup-project src/MyProject.Core/MyProject.Core.csproj \ --data-annotations \ --context MyProjectContext \ --force \ --output-dir Data/Entities \ --namespace MyProject.Core.Entities \ --context-namespace MyProject.Core.Data \ --context-dir Data \ --no-onconfiguring \ "Host=postgres;Port=5432;Username=postgres;Password=password;Database=myproject" \ Npgsql.EntityFrameworkCore.PostgreSQL
And I got the following error:
The generated output only goes as far as the following in the DBContext:
And for the model iteself the output is:
Btw, I'm using the
NodaTime
library for theInstant
type. In the case of theInstant
typeNodaTime
was able to replace thetimestamp with time zone
type from sql.Maybe there is a way to implement proper mapping as well for scaffolding as
NodaTime
has?The text was updated successfully, but these errors were encountered: