NHydrate is a lesser-known ORM for .Net - I stumbled across it for the first time yesterday.
They have a good amount of information on their Codeplex page, and a several videos that are also quite informative.
After reading through the docs and watching some of the videos I feel very curious about this ORM. Model driven development, a...
Hello, I have some annoying problem with NHibernate and deletion of classes. I have a rather complicated tree-like class diagram, where the "leaves" are abstract classes with many different "sons". I have no problem with saving or updating it, but I have some annoying problems with delete, so I decided to change the cascades to "save-upd...
Suppose I have the following tables:
Company Person Address
----------------------------------------------------------------------------
Id (PK) Id (PK) Id (PK)
Name CompanyId (FK) CompanyId (FK)
AccessType AddressType
Corresponding t...
I am trying to create a map to get results as like from below query.
I am having hard time to get set Product mapping to set References to Product_Line on 3 columns as in where condition. How can I achieve this using fluent?
Product table: cId, ProjID, Line, etc., columns
Product_Line table: cId, ProjID, Line, etc., columns
select f.* ...
I am deploying Asp.Net MVC 2 application on Windows Server 2003.
I am using NHibernate for data access.
When I deployed this application on Windows server 2003 and browse to it the application throws an exception saying "hibernate.cfg.xml not found under Windows/System32/inetsrv."
Why NHibernate is searching Windows/System32/inetsrv ra...
Hello.
I have a question. Imagine you'd have an object you'd want to save in a transaction, the object having collections of other objects etc so its a more "complex" object.
Anyway, sometimes we save objects like that, but in the meantime, we use another thread that occasionally reads said data and synchronizes them up to our central ...
I have enabled 2nd level cache in FluentNHibernate:
Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2005
.ConnectionString(connectionString)
.Cache(c => c.ProviderClass<SysCacheProvider>().UseQueryCache())
)
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<PersonMap>())...
Im using NHibernate to execute a SQL statement that first inserts a new row, then inserts a row in a different table based on the id that the first insert generated.
The SQL for it works fine:
INSERT INTO messages(MessageSubject,MessageText,MessageSenderTribeID,MessageSentTime,MessageHasAttachments)
VALUES('subject', 'text',204948, 2...
I am just wondering what is the best way of getting INotifyPropertyChanged in my NHibernate Domain Objects' Collections?
...
Hi
I would like to build a tree of Organisations.
I use the following mapping and class.
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Foundation.DomainModels.Organisation, Foundation" table="Organisation" lazy="true">
<id name="Id" column="ID" type="Int32" unsaved-val...
Which one is the best .NET ORM for using in a Windows Forms application?
I like NHibernate, but it seems that NHibernate is mostly used in web applications.
...
Backgroud: I'm using NHibernate for my model layer, and I have a HTTP module taking care of instantiating the session at the beginning of each request and cleaning it up at the end of each request (i.e. Session Per Request). In this case, I have two object types:
ParentItem - an object with a bunch of properties and a collection of...
Why does NHibernate require an Oracle stored procedure to return a result set? It seems like this requirement adds overhead to open a data reader when it is not necessary.
...
As I began writing web applications with asp.net I started with small projects that used a Linq-To-SQL mapper for database access to a MSSQL Server.
After gaining some expierence I switched into a classic 3 tier with Graphic Layer, Business Layer, Data Layer. The only function of the Data Layer was to provide methods insert/update/delete...
I need to sort a result set by two columns, one of which is always NULL.
A simplified view of Database where the columns I wish to sort on look like :
ColumnA is from Table A
Column B, B1 is from table B
ColumnA ColumnB ColumnB1
U NULL NULL
P NULL NULL
L NULL NULL
NULL U NULL
NULL ...
Hi, i have the following db structure:
Users:
- UserID
- UserName
- FirstName
- LastName
...
UsersLog:
- UserLogID
- UserID
- UserName
- FirstName
- LastName
...
- DateCreated
The log table simply inserts a record against the user everytime an insert or edit is made. The reason i have the log table is that when an order is submitted...
When I use SchemaExport with SQL Server 2005, it generate unique key name like: UQ_Employees_03317E3D
Hom can I generate a name like: UQ_Employees_Name?
Even in SQL Server!
...
At the moment im trying to implement code that handles stale state exceptions (ie, another user has changed this row etc.. ) nicely when im committing a transaction using nhibernate. The idea is to, when the exception occurs when flushing, to roll back the transaction, "fix" the entities through different means, then rerun the whole tran...
Hi all,
Using Microsoft's designer for the Entity Framework (v3.5), I have created an Entity Model (*.edmx) with a generated *.Designer.cs class. I can persist my objects to MS SQL Server using the model without any problems.
I am new to NHibernate, and out of curiosity, I now would like to use my model with Fluent NHibernate and SQL...
In our SOA application we have several customers' data in the same database and in the same tables.
To control access, we have a column that describes this relationship. This column isn't represented in the domain model, however. I know about query only properties - so, for querying - it is working perfectly.
However, how do I write to...