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,
I'm using Postgresql as database, the tables were manually generated.
PG version: 14.1-1.pgdg110+1
NHibernate version: 5.3.10
FluentNHibernate version: 3.1.0
Npgsql version: 6.0.2
------- TABLE AUTHOR -------CREATETABLEauthor (
id bigintNOT NULL,
name character varying(50)
);
ALTERTABLE author OWNER TO myuser;
CREATESEQUENCEauthor_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTERTABLE author_id_seq OWNER TO myuser;
ALTERSEQUENCE author_id_seq OWNED BY author.id;
ALTERTABLE ONLY author ALTER COLUMN id SET DEFAULT nextval('author_id_seq'::regclass);
ALTERTABLE ONLY author ADD CONSTRAINT author_pkey PRIMARY KEY (id);
------- TABLE BOOK -------CREATETABLEbook (
id bigintNOT NULL,
author_id bigintNOT NULL,
title character varying(100)
);
ALTERTABLE book OWNER TO myuser;
CREATESEQUENCEbook_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
ALTERTABLE book_id_seq OWNER TO myuser;
ALTERSEQUENCE book_id_seq OWNED BY book.id;
ALTERTABLE ONLY book ALTER COLUMN id SET DEFAULT nextval('book_id_seq'::regclass);
ALTERTABLE ONLY book ADD CONSTRAINT fko5rb7l9pwc20t4465iphn69wt FOREIGN KEY (author_id) REFERENCES author(id);
ALTERTABLE ONLY book ADD CONSTRAINT book_pkey PRIMARY KEY (id);
The schema validation generate an Exception for each data type, checking the ValidationErrors array:
- ValidationErrors Count = 5 System.Collections.ObjectModel.ReadOnlyCollection<string>
[0] "Wrong column type in MyDatabase.public.author for column id. Found: bigint, Expected int8" string
[1] "Wrong column type in MyDatabase.public.author for column name. Found: character varying, Expected varchar(255)" string
[2] "Wrong column type in MyDatabase.public.book for column id. Found: bigint, Expected int8" string
[3] "Wrong column type in MyDatabase.public.book for column author_id. Found: bigint, Expected int8" string
[4] "Wrong column type in MyDatabase.public.book for column title. Found: character varying, Expected varchar(255)" string
Changing the version of the Npgsql to 4.1.10 all works correctly, would you fix this?
The text was updated successfully, but these errors were encountered:
Hi,
I'm using Postgresql as database, the tables were manually generated.
Classes
Mappings
Code
The schema validation generate an Exception, checking the ValidationErrors array:
Changing the Mappings without
.CustomSqlType
:The schema validation generate an Exception for each data type, checking the ValidationErrors array:
Changing the version of the Npgsql to 4.1.10 all works correctly, would you fix this?
The text was updated successfully, but these errors were encountered: