nhibernate

What does NHibernate.Search ContainedIn attribute do?

And how it differs from IndexedEmbedded? P.s. and what's the best source of information about NHibernate.Search? ...

NHibernate vs EF4 - Performance on Low End Computer

I'm working on a small Windows Form application that will be run on a Netbook computer. I will control the hardware/environment, meaning I provide the hardware and software to the end user. It will have a single database on the local drive that only this one app will access. It will have a couple tables and a few hundred (or maybe a c...

CreateAlias and NHibernate joins on classes w/ no mapped relationship

I'm beginning to wonder if I am in fact too dumb to use NHibernate. I'm currently using FluentNHibernate to create simple db mappings and that's worked well for us. When dealing w/ our various classes in isolation, we're able to read and write, perform updates, etc. to all of those classes. My problem however is in trying to build up ...

How to get&build latest version of NHibernate.Search?

This is silly, but i can't understand how to do it. Checked out from svn (https://nhcontrib.svn.sourceforge.net/svnroot/nhcontrib) source, but when i try to build it, there's bunch of errors about FullTextSessionImpl which does not implement ISession interface members. Tried hornGet, but it shows "The build tool Horn.Core.NAntBuildTool...

Lucene.NET through NHibernate.Search and POCO Entities

Is there anyway to keep true POCO Entities while working with Lucene.NET through NHibernate.Search ? It seems that Lucene.NET (NHibernate.Search) mapping only work with Attributes within Entity classes. ...

NHibernate Caching Dilemma

My application includes a client, web tier (load balanced), application tier (load balanced), and database tier. The web tier exposes services to clients, and forwards calls onto the application tier. The application tier then executes queries against the database (using NHibernate) and returns the results. Data is mostly read, but writ...

nHibernate generating correct SQL, but returning empty rows

Dear All, I have the following ICriteria query, public override IQueryable<ApplicationVehicleSummary> GetQuery(ISession session) { ICriteria results = session.CreateCriteria<Part>() .Add(Restrictions.Eq("PartNumber", _partNumber)) .CreateCriteria("Applications") .CreateAlias("Vehicles", "veh...

Mapping a JSON-encoded string in the DB to a Dictionary property on my object, using NHibernate

I have an object that maintains a property bag of various properties. This is exposed through my object model as a Dictionary<string, string> and is stored in the database as a JSON-encoded string. What is the best way to map this class using Fluent NHibernate? Option 1: Map to a private field, do JSON translation in my object? Shoul...

NHibernate custom collection type

Hi, I'm having an entity object called Patient and this entity is having a property called Visits which is of type VisitsCollection. VisitsCollections is a child class of IList<Visit> but it also adds some custom logic to the collection (like auto ordering, some validation, notifications, etc..). I need to use the custom collection ty...

NHibernate-friendly database design for dynamically recreated tables

Hi, I have an application design question for the nhibernate gurus our there. My application tracks a list of documents submitted and displays data parsed from those documents to the public as a searchable transaction list. The people/entities submitting these documents may (at any time) replace a previous version of a document with a...

NHibernate: Setting up references with IResultTransformer

I have a custom class that implements IResultTransformer. It is easy to make this work for single values but what is the correct way to setup references if only the id is in the tuple? What if they are supposed to be lazy loaded? Should I just load them from the Session using the Get or Load methods? For example: public class FoobarRe...

Using NHibernate to create an SQLite database with a "UNIQUE ON CONFLICT REPLACE" column.

Is this possible? If not, how can I create a table with a "UNIQUE ON CONFLICT REPLACE" column in code? ...

Is there any work-around for NHibernate-to-LINQ not supporting subqueries?

I know LINQ-to-NHibernate currently does not support sub-queries (http://ayende.com/Blog/archive/2009/07/26/nhibernate-linq-1.0-released.aspx). Is there any workaround about it? ...

Ensure NHibernate SessionFactory is only created once

I have written an NHibernateSessionFactory class which holds a static Nhibernate ISessionFactory. This is used to make sure we only have one session factory, and the first time OpenSession() is called I create the actuall SessionFactory - next times I use the same and open a session on it. The code looks like this: public class Nhibern...

LINQ vs. nHibernate

Question: Until now, I didn't know LINQ was an ORM tool. I always saw it as some new kind of SQL query language. So I very recently started using nHibernate. So my question: What would be the advantages and disadvantages of LINQ in comparison to nHibernate? As far as I found out, the differences are that LINQ requires .NET > 2.0 (unle...

Using ICompositeUserType on different tables with different column names.

Hi, I've been trying to get an NHibernate ICompositeUserType mapping to work. But am stuck trying to make the implementation generic enough to use on different tables. Our legacy database has many tables with latitudes and longitudes in and I want to map them into my domain objects as a Position class. The problem is each table has dif...

Should I use NHibernate Collection Cascading

Should I use NHibernate Collection Cascading to perform collection save-updates, or should I use repositories to persist entity collection entities ? ...

NHibernate with Sql Azure and Sharding

Does anyone have any good sources of information of using NHibernate with Sql Azure with the implications of sharding (because of the 10gb cap)? I know there are posts on the internet that reference a sharding project for NH but they are from 3rd quarter 09 and I haven't found any much more relevant on google. Related does anyone have i...

Which second level cache to select for nHibernate?

I have a Data Service created using WCF that internally uses nHibernate. This WCF Data Service is used by Asp.Net application from Web Server. To improve the performance of the nHibernate Data service I want to implement nHibernate second leve cache. Which second level cache provider will be good in this scenerio? As the SysCache uses As...

Spring.Net + NHibernate - The 'http://www.springframework.net/database:provider' element is not declared.

I’m having some Spring and NHibernate issues which nobody seems to be able to resolve. I'm using the NorthWind project as an example to go off of. Right now I’m getting this error: 'MyNamespace.MyClass.MyFunction: Spring.Objects.Factory.ObjectDefinitionStoreException : Line 6 in XML document from assembly [MyAssembly, Version=0.0.1.0,...