Hello, we encountered the need for database partition tables.
We need to divide the table into parts 1 month (datetime timestamp).
Partitioning Using Inheritance.
CREATE TABLE test (
id int8 NOT NULL,
versionobject int8 NOT NULL DEFAULT 1,
person_id int8 NULL,
datetime timestamp NOT NULL,
CONSTRAINT test_pkey PRIMARY KEY (id)
);
CREATE TABLE test_2022_01_01 (
CHECK (datetime >= DATE ‘2022-01-01’ AND datetime < DATE ‘2022-02-01’)
) INHERITS (test);
There is a trigger that writes data to the desired part.
Cannot add row
NHibernate.StaleStateException: “Unexpected row count: 0; expected: 1”
Modules.ORMNHibernate.TestRepository.Add.AnonymousMethod__0() in TestRepository.cs
Modules.ORMNHibernate.TestRepository.ExecuteAndRollbackIfException(System.Func) in TestRepository.cs
Modules.ORMNHibernate.TestRepository.Add(System.Collections.Generic.IEnumerable, string, bool) in TestRepository.cs
Thanks