I have some problems with deleting object. I am getting the following error:
[Test.Item#ab9a9869-b2c1-4262-8d33-9dd9010abd96][SQL: DELETE FROM InvoerItem WHERE DbId = ? AND Version = ?]
The DELETE statement conflicted with the REFERENCE constraint "FK9100B9F130A0A610". The conflict occurred in database "", table "dbo.InvoerItem...
I was lookin all over the internet for this particular problem of mine. I found some suggested solutions but they don't work.
Here is the setup:
I am using ActiveRecord/NHibernate. I created an assembly wrapping ActiveRecord called the BusinessLogic. The idea is that all my projects should use the BusinessLogic instead of referencing A...
I am currently facing transaction deadlock issues in Nhibernate data layer. The scenario is :
I have a large transaction table T1. This table undergoes frequent write/update operations. Also, a service frequently reads this table(based on filter) and merges the data with client cache(on client machine). The frequency of read is very hig...
I have created a new 1.6 Sharp Architecture project.
I have marked my only Entity with HasUniqueDomainSignatureAttribute and one string property marked DomainSignatureAttribute.
I create 2 entities with the same DomainSignature and I'm able to save them both thous having duplicates.
Am I missing some configuration? As I was under the ...
Hi,
We are using NHibernate with Fluent mapping to build a WebForms application.
In our model, we have a simple References relationship with Cascade.All() set. When we save the entity, NH behaves as expected and 1) saves the referenced entity, 2) updates the parent entity setting the child key.
Deploying this same version to our prod...
Hello,
I'm writing an HQL query, in the form of:
from a where ... or exists (from b inner join b.c where ...) and ...
I get back an entity of type a from this query. However, I need to also know whether the exists clause came back true or not later on in my code. If this was SQL, I'd tack it onto the select list. However, even if I a...
Hello,
I am having trouble using CreateCriteria to add an outer join to a criteria query while using Fluent NHibernate with automapping.
Here are my entities -
public class Table1 : Entity
{
virtual public int tb1_id { get; set; }
virtual public DateTime tb1_date_filed { get; set; }
.
.
.
virtua...
When invoking Session.Load where the class in question contains a composite id, Load expectes the provided criteria to be an example of the object in question with all the PK properties filled in. The problem is that I want to create a generic IRepository interface with a single Load method, always providing a QBE. However, it seems that...
Hi,
We have a situation where we have multiple databases with identical schema, but different data in each. We're creating a single session factory to handle this.
The problem is that we don't know which database we'll connect to until runtime, when we can provide that. But on startup to get the factory build, we need to connect to a...
I'm having some problems with getting the following convention to work:
public class ColumnNameUpperConvention : IPropertyConvention
{
public void Apply(IPropertyInstance instance)
{
string cName = instance.Property.Name.ToUpper();
instance.Column(cName);
}
}
What I'm wanting the above code to do ...
Possible Duplicates:
ADO.NET Entity vs NHibernate
nhibernate, entity framework, active records or linq2sql
Hi all, I'm going to choose a ORM tool for the new project. Just wondering which one is better? Entity Framework or NHibernate? Please give some suggestions according to your own experience. Thanks
...
I have three mappings as follows:
public MainChapterMap()
{
// other properties
HasMany(x => x.ClientSpecific).KeyColumn("MainChapterId");
}
public MainChapterClientMap()
{
// other properties
References(x => x.MainChapter).Column("MainChapterId");
HasMany(x => x.Details).KeyColumn("MainChapterClientId");
}
publi...
I have got four tables in NHibernate
Job
{
DBID { int, primary key }
Name { string }
Media { fk_media (int) }
PublishInfo { fk_publishinfo (int) }
}
Media
{
DBID { int, primary key }
TransmissionID { string }
Series { string }
Title { string }
Description { string }
}
PublishInfo
{
DBID { int, primary key }
Desti...
I am using nHibernate 2.1.2.4000 with Asp.Net 4.
I also have a mapping defined for an Entity. The mapping also defines a filter named CultureCode.
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Demo.EntityCore.Domain.Option, Demo.EntityCore" table="tbl_options">
<...
I'm working with an existing database that has the following structure. Changing the database schema is a last resort.
Products
Id
Name
ParentProducts
ParentId
ChildId
I don't want an entity for ParentProducts, I have the following for the children property (still need to test it, but that's the concept).
<bag name="Chil...
I downloaded the binaries of nhibernate from their original site,
if i get the source code, can i debug their binaries??
what I mean : I don't want to rebuild the source code and take the binaries to the project
and then debug them.
BTW they don't provide a pdb files with their binaries.
i just want to link my source code to the already ...
I have an implementation of IPostLoadEventListener which converts DateTime properties from UTC in our database to the user's local time zone.
This works fine when working with NHibernate entities using Session.Get, but I can't find a way to get Linq for Nhibernate to observe the event listener, which means the DateTime properties on any...
I have an IQueryable<Product> that needs to be sorted by Name. Each Product has an IQueryable<Category> that also needs to be sorted by Name. I'm having a hard time expressing this in Linq. I could loop through the products and sort each category list, but it seems messy. Hoping a Linq ninja has a smarter solution.
My Product class look...
error
Could not compile the mapping document: WebApplication1.documents.hbm.xml
![alt text][1]
photo
http://forum.sources.ru/index.php?act=Attach&type=post&id=2684138&attach_id=1097
web.config
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="hibernate-configuration" type="NHibernate.Cfg.Con...
I'm trying to configure NHibernate 3.0 to use ISessionFactory.GetCurrentSession() in WCF 4.
What do you recommend I use?
...