Questions tagged [nhibernate-4]
16 questions
5
votes
3 answers
Breaking changes with NHibernate 4 upgrade
I can see what's new and fixed in NHibernate 4.0
I would like to know if anyone has had issue with hbm mappings upgrading from NHibernate 3 to 4?
I fear that more focus is going on fluent mapping these days. I can test for the more obvious breaking…

dove
- 20,469
- 14
- 82
- 108
4
votes
2 answers
NHibernate 4 upgrade - Cannot simultaneously fetch multiple bags
I tried to upgrade NH 3.3.1.4000 to the latest version NH 4.0.2.4000 and I had an issue with FetchMany and ThenFetchMany.
In this post I learned that this old functionality is no longer valid, Breaking changes with NHibernate 4 upgrade.
What is the…

Matan Shidlov
- 127
- 2
- 9
2
votes
2 answers
How can I select a boolean literal in HQL?
I can select int and string literals in HQL like so:
select 'a string' as StringLiteral, 1 as IntLiteral from Eg.MyClass
but I haven't found a way to select a boolean literal. I've tried select true ..., and select new bool true ... but those cause…

brainbolt
- 616
- 1
- 10
- 24
2
votes
1 answer
How would I alter the SQL that Linq-to-Nhibernate generates for specific columns?
To take advantage of Full text indexing on MariaDB 10, I need to use this new "MATCH AGAINST" syntax in the sql string.
http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html#function_match
I think it would be really cool if, for certain…

Isaac Bolinger
- 7,328
- 11
- 52
- 90
1
vote
1 answer
NHibernate thinks order by column isn't in select
I'm trying to get page 2 of results of a query, this is the prepared statement SQL query my code builds:
SELECT DISTINCT Contents.*
FROM Contents
INNER JOIN ContentsFilter ON ContentsFilter.ContentId = Contents.ContentId
INNER JOIN Filter ON…

MrLore
- 3,759
- 2
- 28
- 36
1
vote
0 answers
How to eager fetch multi level objects with NHibernate
I have the following Entity's:
public class Parent
{
public string Id { get; set; }
public Ilist Children { get; set; }
}
public class Child
{
public string Id { get; set; }
public Ilist Parents { get; set; }
…

Liran Ochin
- 21
- 2
1
vote
1 answer
Parallel.ForEach used with NHibernate resulting in SQL Server locks
Firstly, I am not much of an expert in multi-threading and parallel programming.
I am trying to optimize the performance of a legacy application (.Net 4, NHibernate 2.1).
**So far, upgrading NHibernate is not a priority, but is in the pipeline.
Over…

tinonetic
- 7,751
- 11
- 54
- 79
1
vote
1 answer
NHibernate: Can't Select after Skip Take In Certain Scenario
For some reason I am unable to use Select() after a Skip()/Take() unless I do this in a certain way. The following code works and allows me to use result as part of a sub query.
var query = QueryOver.Of();
query.Skip(1);
var result =…

user2483770
- 73
- 7
1
vote
1 answer
Hibernate cascade issue on delete record
I have issue with cascade a one to many relationship.
One of my table contains a component, and the component is linked to another table which is my gallery (gallery have many kind of relationship with other tables.). Then the component is used in…

Hassan Faghihi
- 1,888
- 1
- 37
- 55
1
vote
3 answers
Nhibernate 4 API documentation
I am not able to find which namespace contains what for methods.
e.g. NHibernate.IQueryOver does not contain a definition for 'Add'
and no extension method 'Add' accepting a first argument of type .
Visual studio is not helping to get appropriate…

dkt
- 144
- 2
- 13
0
votes
0 answers
Cannot resolve class for Hibernate4
I'm actually trying to import an external dao and an external persistence in a new Spring Boot application. I never do that before, and pursuant to another developper explanations, I've created:
ApplicationContext.xml :

Greg
- 127
- 1
- 15
0
votes
1 answer
Hibernate Envers Auditing
I am using Hibernate4 with envers for audit logging purposes.
I have a table:
PRODUCTS(PRODUCT_ID(primaryKey),
PRODUCT_CODE,
PRODUCE_DESC,
PRODUCT_FEE)
Hibernate has created an audit table PRODUCTS_AUD.
Whenever there is…

Sonu Agarwal
- 97
- 2
- 12
0
votes
1 answer
NH4 LINQ Query using wrong column for one-to-one
I have one-to-one relationship between two tables, and I want to be able to create a LINQ query that will return the "parent" tables where there is something in the child table. The problem is that the query NH is generating is checking to see if…

Becca Dee
- 1,530
- 1
- 24
- 51
0
votes
1 answer
Create relation one-to-many without Foreign Key in nhibernate4
i'm new to NHibernate 4 and i try to create a one-to-many relation between two table in DB2, the tables don't have a foreign key and i can't edit the tables.
When debug the application i catch error in .saveorupdate method.
The tables…

Nopesound
- 482
- 1
- 13
- 28
0
votes
1 answer
Can I tell nhibernate to swap a System.Data.DbType out for a custom IUserType completely?
I see how I can use the mapping file to specify a custom IUserType for any nhibernate mapped class I want.
However, I don't want to type it in every time. Is there a way to override the standard mapping table seen here?
I have Jørn Schou-Rode's…

Isaac Bolinger
- 7,328
- 11
- 52
- 90