{"id":37041713,"url":"https://github.com/beginor/nhibernate-npgsql","last_synced_at":"2026-01-14T04:55:47.070Z","repository":{"id":22739297,"uuid":"97188780","full_name":"beginor/nhibernate-npgsql","owner":"beginor","description":"PostgreSQL extension for NHibernate","archived":true,"fork":false,"pushed_at":"2022-04-23T10:52:30.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-01T07:25:40.847Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beginor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-14T03:22:58.000Z","updated_at":"2023-01-28T01:22:54.000Z","dependencies_parsed_at":"2022-08-07T10:16:09.033Z","dependency_job_id":null,"html_url":"https://github.com/beginor/nhibernate-npgsql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beginor/nhibernate-npgsql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beginor%2Fnhibernate-npgsql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beginor%2Fnhibernate-npgsql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beginor%2Fnhibernate-npgsql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beginor%2Fnhibernate-npgsql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beginor","download_url":"https://codeload.github.com/beginor/nhibernate-npgsql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beginor%2Fnhibernate-npgsql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T04:55:46.467Z","updated_at":"2026-01-14T04:55:47.065Z","avatar_url":"https://github.com/beginor.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"This project is no longer maintained. Take a look at the [NHibernate Extensions for .NET Core project](https://github.com/beginor/nhibernate-extensions) for the following extentions:\n\n- [NHibernate.Extensions.NpgSql](https://github.com/beginor/nhibernate-extensions#nhibernateextensionsnpgsql)\n- [NHibernate.Extensions.Sqlite](https://github.com/beginor/nhibernate-extensions#nhibernateextensionssqlite)\n- [NHibernate.NetCore](https://github.com/beginor/nhibernate-extensions#nhibernatenetcore)\n\n----\n# Beginor.NHibernate.NpgSql\n\nNHibernate Extension for supporting of PostgreSQL's `json`, `jsonb` and\n`string[]` field.\n\n## Usage\n\n### 1. Set `connection.driver_class` to `Beginor.NHibernate.NpgSql.NpgSqlDriver,Beginor.NHibernate.NpgSql` as flow:\n\n```xml\n\u003chibernate-configuration xmlns=\"urn:nhibernate-configuration-2.2\"\u003e\n  \u003csession-factory\u003e\n    \u003cproperty name=\"connection.driver_class\"\u003eBeginor.NHibernate.NpgSql.NpgSqlDriver,Beginor.NHibernate.NpgSql\u003c/property\u003e\n    \u003cproperty name=\"dialect\"\u003eNHibernate.Dialect.PostgreSQL82Dialect\u003c/property\u003e\n    \u003c!-- other properties --\u003e\n  \u003c/session-factory\u003e\n\u003c/hibernate-configuration\u003e\n```\n\n### 2. Reference the types needed to mapping file\n\n`TestEntity.hbm.xml`\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\n\u003chibernate-mapping\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n    xmlns=\"urn:nhibernate-mapping-2.2\"\n    namespace=\"Beginor.NHibernate.NpgSql.Test.Data\"\n    assembly=\"Beginor.NHibernate.NpgSql.Test\"\n    \u003e\n\n    \u003ctypedef name=\"npgJson\" class=\"Beginor.NHibernate.NpgSql.JsonType, Beginor.NHibernate.NpgSql\" /\u003e\n    \u003ctypedef name=\"npgJsonb\" class=\"Beginor.NHibernate.NpgSql.JsonbType, Beginor.NHibernate.NpgSql\" /\u003e\n    \u003ctypedef name=\"npgStringArray\" class=\"Beginor.NHibernate.NpgSql.StringArrayType, Beginor.NHibernate.NpgSql\" /\u003e\n\n\u003c/hibernate-mapping\u003e\n```\n\n### 3. Use theme in mapping file\n\n```xml\n\u003cclass name=\"TestEntity\" table=\"test_table\" schema=\"public\"\u003e\n    \u003cid name=\"Id\" column=\"id\" type=\"int\"\u003e\n        \u003cgenerator class=\"sequence\"\u003e\n            \u003cparam name=\"sequence\"\u003epublic.test_table_id_seq\u003c/param\u003e\n        \u003c/generator\u003e\n    \u003c/id\u003e\n    \u003cproperty name=\"Name\" column=\"name\" type=\"string\" length=\"32\" /\u003e\n    \u003cproperty name=\"Tags\" column=\"tags\" type=\"npgStringArray\" length=\"32\"\u003e\u003c/property\u003e\n    \u003cproperty name=\"JsonField\" column=\"json_field\" type=\"npgJson\" /\u003e\n    \u003cproperty name=\"JsonbField\" column=\"jsonb_field\" type=\"npgJson\" /\u003e\n    \u003cproperty name=\"UpdateTime\" column=\"update_time\" type=\"datetime\" /\u003e\n\u003c/class\u003e\n```\n\n`TestEntity` is something like:\n\n```cs\nusing System;\n\nnamespace Beginor.NHibernate.NpgSql.Test.Data {\n\n    public class TestEntity {\n\n        public virtual int Id { get; set; }\n\n        public virtual string Name { get; set; }\n\n        public virtual string[] Tags { get; set; }\n\n        public virtual string JsonField { get; set; }\n\n        public virtual string JsonbField { get; set; }\n\n        public virtual DateTime UpdateTime { get; set; }\n    }\n\n}\n```\n\nDone !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeginor%2Fnhibernate-npgsql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeginor%2Fnhibernate-npgsql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeginor%2Fnhibernate-npgsql/lists"}