NHibernate is a mature, open source object-relational mapper (ORM) for the .NET framework.

learn more… | top users | synonyms

1
vote
0answers
2 views

Error “could not execute batch command.[SQL: SQL not available]” after failed delete in NHibernate

After I delete an entity related to another record, this error occurs due to reference integrity: "The statement DELETE in in conflict with the constraint...etc" I manage this error with this code: ...
0
votes
0answers
9 views

Map foreign key in Fluent NHibernate without object property

My question is, is there a possible Fluent NHibernate mapping for Parent and Child objects that does not require the Child object to have a Parent object property? I haven't figured out how to map the ...
0
votes
1answer
19 views

How do I map my database to my model?

I'm using NHibernate 3.3.2.4 (Not Fluent)... I'm trying to map a database model to an application model and I'm coming unstuck. I have the following database structure (simplified for brevity): ...
0
votes
0answers
14 views

Issue with lazy loading and inheritance in NHibernate

I have the following scenario in a C# application using NHibernate: public abstract class A { public virtual int SomeProperty { get; protected set; } public abstract void ...
0
votes
0answers
9 views

Can we kill mssql 2012 with deadlocks or bad request from nhibernate?

I am a Accidental dba admin sometime :) and i have this question : When you have deadlocks or bad request on a mssql 2012 on a windows 2k12 . Is it possible the combo kill the mssql service ? I have ...
0
votes
0answers
6 views

NHibernate equivalent of SQL IsNull(column, 'defaultValue')

How can I use NHibernate (preferably QueryOver syntax) to get the following SQL SELECT this_.Name as_, count(IsNull(this_.Name , 'UNKNOWN') ) as NameCount FROM...
0
votes
2answers
7 views

NHibernate projections: How to project QueryOver into list of int?

Trying to project query result into a list of integers. How does one do that? What transformer should be used. AliasToBean does not work as it requires setter. var accessFeeYears = ...
0
votes
0answers
5 views

NHibernate QueryOver Group with conditional grouping

The following snippent shows a grouping by name to find counts per name. .SelectList(list=> list .SelectGroup(t => t.Name).WithAlias(() => dto.Name) ...
0
votes
0answers
5 views

Where to configure NLog NHibernate bridge for logging sql configuration?

As a proof-of-concept I am using a console application wrapping a proxy of a WCF service. I execute a few calls through the proxy and write the results to the console. Underlying the WCF service is a ...
0
votes
1answer
8 views

NHibernate projection: How to create AliasToBean projection?

I am trying to convert this inefficient query into one that projects into a dto. Original query looks like this: var flatFeePolicies = _session.QueryOver<FlatChargeAccessFee>(() => ...
0
votes
1answer
17 views

Parameterized SQL - in / not in with fixed numbers of parameters, for query plan cache optimization?

If SQL is used directly or created by NHibernate, with possibly big "where in / not in ([1 to 100 parameters])" conditions, does it make sense to fill up parameters to certain limits, to have a ...
0
votes
0answers
2 views

Need help to join tables using nhibernate and queryover

I am new to nhibernate and i struggle to join to tables by id. I must use queryover. TeamId property of Player is foreign key to Id property of Team. I created foreign key by using sql server ...
0
votes
0answers
9 views

nHibernate Envers with Composite Key

Stuck again with Composite Key and its now with Enverse. It says "Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null is currently not supported in Envers. If you need composite-id, use ...
-1
votes
0answers
27 views

Unable to locate class in using nhibernate in C#

I have two classes, two mapping files and one table in database as follow. IReqRequest class, IReqRequest mapping file and IReqRequest table. I create a new class as follow. using System; using ...
0
votes
0answers
13 views

nHibernate 3 way mapping

I'm trying to map some tables in the database to a nhibernate .hbm.xml file so far my mapping looks like this <?xml version="1.0"?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" ...

1 2 3 4 5 947
15 30 50 per page