I have many-to-one mappings working fine, but a one-to-many relationship between locations and location_times keeps giving me an error.
I keep getting this error:
on this line of code:
Mappings look like this:
Location:
public virtual…
I have a query using linq to NHibernate, for EnterAndExitArchive entity. This entity has a association by Archive entity.
public EnterAndExitArchive GetLastEnterAndExitArchive(long archiveId)
{
var q =…
I installed with NuGet the packages NHibernate and Castle.Core 3.0 for a new project. Usually we copied around the dlls manually; it is the first time I do that with NuGet.
Now I can't find out how to configure the ProxyFactoryFactory, or let's say,…
I am using NHibernate interceptors to log information about Updates/Inserts/Deletes to my various entities.
Included in the information logged is the Entity Type and the Unique Id of the entity modified. The unique Id is marked as a
I have a legacy application (vfp 8) that I need to pull data from (no inserts). I am using the Accnum field as the primary key, it is defined in the table as character 11.
Factory configuration:
We are working on different integrations to a swarm of identically structured legacy databases that basically cannot be altered. For this, we added an auxiliary database for holding things like meta-information, routing rules and for temporarily…
I am wondering how much should my service layer know of my repository? In past project I always returned lists and had a method for each thing I needed.
So if I needed to return all rows that had an Id of 5 that would be a method. I do have generic…
I have the following exception occurring seemingly at random:
NHibernate.Exceptions.GenericADOException: could not execute query
[ select businesspr0_.BusinessProcessID as col_0_0_, businesspr0_.ProcessNumber as col_1_0_, businesspr1_.Name…
I need to order result in DB table ChargeOperations in my own direction by typeId.
The SQL request is like this:
SELECT * FROM ChargeOperations co
LEFT JOIN ShadowChargeOperations sco ON sco.ChargeOperationId=co.Id
-- just exclude some extra…
I have a table called "Orderrow". Orderrow has a a compound primary key (CPK) with the following columns: OrderId, ProductId, RowNumber
OrderId and ProductId are also foreign keys refering to the tables Order and Product. The RowNumber is generated…
I can't get SQLite Driver working in my sessionfactory.
I downloaded SQLite 1.0.48 from http://sqlite.phxsoftware.com/
I have added the references to System.Data.SQLite in my Tests project.
public static IPersistenceConfigurer…
I'm using the following c# code:
public IList GetAllByExpression(Expression> expression, int startIndex, int count, Func dateTimeSelector)
{
using (ISession session = NHibernateHelper.GetSession())
{
…
There is an excellent post on how to map return values for a stored procedure call here:
http://elegantcode.com/2008/11/23/populating-entities-from-stored-procedures-with-nhibernate/
The mapping in this example has been done through hbm files.
I am…
If I read the documentation correctly if I have an Order entity mapped with a version column (incremented by nhibernate) then changes to orderlines should update the version number for the aggregate root (the Order). It does indeed do this when I…