Questions tagged [nhibernate-configuration]

40 questions
12
votes
3 answers

What is the use of session-factory name property in hibernate-configuration file

In hibernate-cfg.xml file, as per my understanding hibernate-configuration can have only one session-factory and one or zero security tags if we configure multiple session-factory then we should get error "The content of element type…
Sasikumar Murugesan
  • 4,412
  • 10
  • 51
  • 74
10
votes
2 answers

NHibernate Configuration in web.config - use existing connectionstring

I have my NHibernate configuration successfully set up in my web.config file. However, I am also using ASP.NET Membership which requires a connectionstring to be defined in the connectionStrings element. Is there a way I can make my NHibernate…
Mike Cole
  • 14,474
  • 28
  • 114
  • 194
9
votes
1 answer

Is Proxy Factory necessary in NHibernate?

I've this configuration in the hibernate.cfg.xml:
Abdulsattar Mohammed
  • 10,154
  • 13
  • 52
  • 66
7
votes
2 answers

NHibernate: How to solve this "dialect" configuration issue

Problem Encountered At runtime, I always get the following NHibernate.MappingException: "Could not compile the mapping document: GI.InventoryManager.CYB.Mappings.Part.hbm.xml" Yes, its build action is set to Embedded Resource. The InnerException…
Will Marcouiller
  • 23,773
  • 22
  • 96
  • 162
6
votes
1 answer

How to set default access to field.camelcase-underscore using Fluent NHibernate?

would like to set this convention up globally if possible.
Jon Erickson
  • 112,242
  • 44
  • 136
  • 174
5
votes
1 answer

When testing NHibernate with a SQLite In Memory configuration, how do you create another database?

We have an app that uses NHibernate/FluentNHibernate with a MsSqlConfiguration.MsSql2008.ConnectionString pointed at our SQL environment. The SQL servers have several database and we can connect to different databases by using a convention like…
shanabus
  • 12,989
  • 6
  • 52
  • 78
3
votes
3 answers

NHibernate configuration to connect to Visual FoxPro 8.0?

Curious if anyone out there has ever connected NHibernate to Visual Foxpro 8.0? I'm looking to hook into a legacy data store, and would prefer to use NHibernate vs. having to hand-code all of the ADO.Net. If anyone has an example of the…
Bob Palmer
  • 4,714
  • 2
  • 27
  • 31
3
votes
2 answers

NHibernate how to avoid session is closed

I can not figure out why im getting session is closed when calling the second query in my class. First i call the method, getPoliceData() I runs fine After that im calling GetSkadeData() and it throw the error: the DbFactory class looks like…
3
votes
2 answers

Connecting nhibernate to Postgresql in C#

This is my first time working with nhibernate and I'm experiencing problems connecting and retrieving data from a Postgresql database. The code doesn't give an error, but returns no values either. When I use pgAdmin3 I do get…
Mark
  • 3,231
  • 3
  • 32
  • 57
3
votes
1 answer

Getting Incorrect syntax near 'OFFSET' error in NHibernate.Linq query

I am getting following error in my ASP.NET MVC 4.0 Application with NHibernate v4.0.0 (.Net Framework 4.0). This error shows in NHibernate.Linq query Incorrect syntax near 'OFFSET'. Invalid usage of the option FIRST in the FETCH statement. IN THIS…
Shell
  • 6,818
  • 11
  • 39
  • 70
3
votes
2 answers

NHibernate in Web API ASP.NET: No session bound to the current context

I'm new to NHibernate and trying to use it in ASP.NET WEB API. Firstly I used it successfully with one table named "Category" which the controller class is as follow: using System.Collections.Generic; using System.Linq; using System.Net; using…
2
votes
1 answer

Why does NHibernate say my filter isn't configured?

I'm trying to use a global filter in NHibernate, and as far as I can tell I'm doing exactly what all the tutorials do, but I'm getting an exception. My .hbm.xml file contains the following: ...
Peter Taylor
  • 4,918
  • 1
  • 34
  • 59
2
votes
1 answer

How to create hibernate configuration file for mysqlcluster?

Need Hibernate configuration (hibernate.cfg.xml) file for mysql cluster. [Hibernate] Auto Generate POJO Classes and *.hbm.xml files. I am able to access Mysql Database using following configuration. And i am also able to access MYSQL NDB Cluster…
2
votes
1 answer

NHibernate SchemaExport.Execute does not create table

Learning NHibernate by following this tutorial Your first NHibernate based application and I got to the point where you call new SchemaExport(cfg).Execute(true, true, false); in a test method to export the schema (create the Product table) for…
EricS
  • 805
  • 1
  • 9
  • 20
2
votes
1 answer

NHibernate.Mapping Exception. No persister for Namespace.className

Have looked at 4 stackoverflow posts on the same issue but couldn't find a solution. My main program: using System; using System.IO; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Text; using…
Nitin Labhishetty
  • 1,290
  • 2
  • 21
  • 41
1
2 3