All Questions
64 questions
0
votes
0
answers
54
views
Case sensitive on Nhibernate in Search Path Postgres
I trying use a string connection who have a Search Path and this one have a Schema who is Case sensitive. I already tried use " and ' but no of these helps me, anyone have see this?
Server=...
0
votes
1
answer
443
views
Nhibernate PostgreSQL dialect does not use "returning" in INSERT statement
I have PG table, where PK is populated by trigger. In pgAdmin it works well. NH mappings is:
<class name="Dokument" schema="srk" table="`Dokumenty`" lazy="true&...
0
votes
1
answer
296
views
NHibernate refuses to validate character varying for varchar(255) in postgres12
I've setup a little project for me to tinker around with NHibernate. I'm using a pgsql 12 server with Npgsql-Driver.
Some of my properties are strings and I defined them in their map like this (...
0
votes
1
answer
116
views
How update version column in DB with NHibernate
Now:
//banan get in previous session and banan.VersionObject = 1
using (var session = factorySession.OpenSession())
{
banan.Name = "diffrent";
session....
1
vote
1
answer
87
views
How can I register two database connections with nhibernate/lightcore?
I have to set up to the existing database(Ms Sql) another one(PostgreSql) with Fluent Nhibernate for my C# Mvc Applicaton. Someone know how can I register the postgreSql database in the ...
0
votes
2
answers
2k
views
Select only most recent record for each group of records
I have an db entity which looks like this:
public class History
{
public int Id {get; set;}
public string Text {get; set;}
public DateTime DateTime {get; set;}
}
In db there can be ...
0
votes
1
answer
545
views
Can't Insert data into database using NHibernate
I'm new in NHibernate I write code which is simple should insert into database information about users that's it
the code is below
UserClassModel
class Users
{
public virtual int id {...
0
votes
1
answer
107
views
Using ":=" in SQLQuery
I have a query that is calling a postgres stored procedure with named parameters. The procedure can take many parameters, most of which have defaults, and I only want to use a couple. The SQL looks ...
0
votes
1
answer
480
views
NHibernate Strange Sequence mapping behaviour
I am trying to figure this strange mapping behaviour of nhibernate.
I Have a sequence ID in PostgreSQL and my mapping.hbm.xml file is this:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2....
0
votes
1
answer
165
views
"syntax error at or near "ON"" when doing bulk manipulation using NHibernate + Npgsql
I'm trying to execute a parameterized "upsert" query using NHibernate named parameters but I'm getting an exception. The syntax appears to be correct but it is still throwing:
NHibernate.Exceptions....
6
votes
0
answers
3k
views
On high load server is blocked by "connection pool has been exhausted, either raise MaxPoolSize or timeout"
I use NHibernate with Npgsql 3.1.5.0 and when testing with high load sometimes server is completely blocked by this exception.
After downgrading to postgresql 9.4.4 it happens on higher load but is ...
0
votes
1
answer
399
views
nhibernate, How to create a Custon IUserType for the type "numeric array"
I have a type numeric[] in my postgresql table, I'm trying to use nhibernate to mapping this with my class
public class Samples {
public virtual int SampleId { get; set; }
public ...
0
votes
1
answer
144
views
SchemaUpdate doesn't work
I made changes to the mapping (added a new table, changed some existing ones), started my app and SchemaUpdate didn't do anything and also didn't throw an exception. I checked with pgAdmin and the ...
5
votes
1
answer
10k
views
How to auto generate IDs in NHibernate
How can I make NHibernate autogenerate unique IDs for a table?
The IDs can be any long values, as long as each one is only used once.
My current mapping looks like this:
<id name="Id">
<...
0
votes
1
answer
332
views
How to convert PostgreSQL query to Linq to SQL for NHibernate
I am using NHibernate and LINQ to SQL and I want to convert the following SQL query:
select min(T."CustomerName") from public."Jobs" as T group by lower(T."CustomerName");
I want to convert it in ...