NHibernate seems to have some new ways to map entities in code, which is really nice, but I can't find any information about configuring the database connections in code. It has been a while since I used NHibernate (version 2) and I am used to…
I'm trying to build an object that looks something like this:
public class MyObject
{
private IList items;
public List Items
{
return items.AsEnumerable().ToList();
}
}
I'm…
I have two classes: container which contains dynamic ordered list of Element.
What C# collection should I use?
What DB schema would you suggest me?
How should I configure the nhibernate mapping?
TIA
I have a one-to-one relationship between a Company class and a CompanySettings class. When I create a new Company object, (a CompanySettings object is created in Company's constructor for its Settings property), and then
SaveOrUpdate(session,…
Looking for some advice on how to proceed here.
I am trying to do some integration testing on wcf services that call other wcf services. I want to make sure that they are configured correctly between one another. We are currently using spring.net…
I'm using an nHibernate stateless session to fetch an object, update one property and save the object back to the database.
I keep getting the error message:
proxies cannot be fetched by a stateless session
I have similar code working elsewhere,…
Before I kick my computer in to next week...
I've checked out every other question about this, but none of them have the solution. I've stripped this code right back, but it's still not working.
I'm getting this error when saving an object:…
Another NHibernate JOIN problem.
I'm trying to join two different properties from one table by different two
keys.
But I can't get the second JOIN property.
Simplified example -
My class -
namespace Domain
{
public class Message
{
…
I'm querying for ProductRisk, which contains a Status property, where Status is an enum. Here's the mapping for ProductRisk:
public class ProductRiskMap : ClassMap
{
public ProductRiskMap()
{
…
I have to do Full text search in NHibernate
For following operation previously I am using Lucene.Net
I have a table called candidate
For full text query Lucene will return all candidate Id from lucene index and form that id I put in query in…
I'm using NHibernate with the version property that automatically increments every time my aggregate root is updated. What happens if 2 or more people update the same record at the exact same time?
Also, how would I test this?
Note that this isn't a…
Assume I have the following two classes:
public class User : Entity
{
public virtual IList Items { get; set; }
}
public class Item : Entity
{
public virtual User Owner { get; set; }
}
I created two mapping classes:
public class…
I have this ASP.NET MVC3 code that's powered by Spring and Fluent NHibernate (NHIB 3.1)
I have this error:
could not resolve property: User.Full_Name of: Harrods.Core.Entities.Teacher
[QueryException: could not resolve property: User.Full_Name of:…
I am using Criteria to speed up a query, and I am almost there.
Using Query By Example to match up rows in a table, remove duplicate rows with the same id, and then paginate.
Of course I can't paginate until I remove the duplicate rows, and I don't…
This is my scenario:
public IEnumerable getSuperMercTree(string IDLanguage)
{
SuperMercModel SMer = null;
SuperMercDescriptionModel descrSMer = null;
MercModel Merc = null;
MercDescriptionModel descrMerc =…