Tagged Questions
0
votes
0answers
33 views
Nhibernate auto mapping inheritance in more assemblies
I have problem with nhibernate auto mapping in multiple assemblies. I think that I don't really understand this auto mapping so if somebody could explain me this in details. I have model divided into ...
1
vote
0answers
35 views
Upgrading to NHibernate 3.3
I have an application using NHibernate 3.1. Now I'm upgrading it to NHibernate 3.3 however some of the usages are no longer used in this version.
SQLString.Paramter - in 3.3 there is no static ...
-1
votes
1answer
17 views
NHibernate - Many to Many relationship - deletion of items
I have the following schema mapped out in Nhibernate. On Deletion of the Sub Category i would like to delete the category and the event sub category. But the Events are being deleted too. Any clue who ...
2
votes
3answers
51 views
Order by Absolute value in NHibernate
I have a Criteria query and I need to achieve this SQL order by query:
ORDER BY Name, DecimalColumn, ABS(DecimalNegativeColumn)
My Order By Criteria looks like this
var result = criteria
...
5
votes
2answers
125 views
Retrieve the units of the last 5 orders
Reference: nhibernate criteria for selecting from different tables
I tried to retrieve e.g. last 5 orders but I got the last 5 units!
Model.Order orderAlias = null;
Model.Unit unitsAlias = null;
...
0
votes
0answers
19 views
nhibernate criteria for search pattern is part of DB record
Can somebody help me and explain how it's possible to get results if the given
search pattern is only a part of the data record?!
e.g. Name = "John Doe" Search Pattern = "John" (should return all ...
0
votes
1answer
38 views
Showing related entities when delete
I have a model with some relations mapped with NHibernate and it is working fine, for sample:
public class A
{
public int Id { get; set; }
// other properties
public ICollection<B> ...
0
votes
1answer
36 views
Nhibernate add filter to query
Reference: nhibernate criteria for selecting from different tables
Based on this question I want to filter this retrieved last 5 orders by at example Unit.Amount == 5! (add filter) I think it's ...
0
votes
0answers
29 views
Nhibernate criteria to search in given IList
I retrieved a set of orders and save it to IList<Order> !
Now I want to filter this retrieved orders, not the whole orders in the database!
Something like this:
public IList<T> ...
0
votes
0answers
19 views
Custom ISQLFunction and location of generated SQL
I would like to add Analytic Function in LINQ to Hibernate. I created my own implementation of Dialect that contain ISQLFunction implementation. Also I have created custom BaseHqlGeneratorForMethod ...
2
votes
1answer
82 views
SubClass Mapping in NHibernate by using same table
I have one table. That is structure.
There are two classes 1. Structure and 2. Plate
Plate is inherited from Structure. The classes are:
public class Structure
{
public virtual decimal Id { get; ...
0
votes
0answers
150 views
NHibernate: one-to-many List with database unique constraint on ParentId-Index columns possible?
I tried to implement a parent-children relation in NHibernate, with a List as one-to-many collection.
Table Parent
------------
int ID, nvarchar(64) Name, ...
Table Child
-----------
int ID, ...
0
votes
1answer
55 views
Hibernate Hbm many-to-many mapping - delete the other part if don't exists relationship in many-to-many table?
I want to know if there is a way to configure hbm mapping to do something like this: when I delete the owner of a many-to-many relationship, after delete the children at the many-to-many table, delete ...
0
votes
2answers
239 views
How to convert query with decode to a query in Hibernate (HQL)?
I want to convert the following query in Oracle to a Hibernate HQL query
select
SYSTEM,
sum(decode(trim(XAXIS),'HIGH',YAXIS,0)) H,
sum(decode(trim(XAXIS),'MEDIUM',YAXIS,0)) M,
...
-1
votes
1answer
128 views
Create table from XML hibernate file
I have a XML file with all the information of a table column names and types. How do I create that table in SQL Server 2008. Do I need to install Hibernate ? What is this hibernate actually is ? How ...