1
vote
0answers
17 views

Where-clause for LINQ-to-NHibernate FetchMany?

Using LINQ-to-NHibernate is there a way to narrow down what FetchMany() returns? Given the following class structure public class Foo { public virtual int Id { get; set; } public virtual ...
0
votes
1answer
29 views

NHibernate.QueryException: not an association: Id

I wrote a joint query using NHiberNate, but I am getting a NHibernate.QueryException:not an association: Id This is what it looks like with NHibernate library TicketRequest ticketAlias = null; ...
0
votes
0answers
13 views

How to specify linqtohql.generatorsregistry property in XML configuration file

It is not possible to specify linqtohql.generatorsregistry in session-factory section of NHibernate xml configuration file because the configuration file is not valid then. Where the property should ...
1
vote
0answers
49 views

Changes in NHibernate 3.3

I'm extending NHibernate.Spatial to use Oracle Spatial Dialect. It used to work with NHibernate 3.1. Nowadays I'm trying to upgrade to NHibernate 3.3 however after fixing the compilation problems I ...
0
votes
2answers
27 views

Linq 2 NHibernate ignoring conditions

I got this query var pc = _session.Query<ValutaHistory>() .Where(x => x.Valutum.ValutaBetegn == updateLine.ProductCurrency) .Fetch(x => x.Valutum) .OrderByDescending(x => ...
0
votes
0answers
38 views

How to build LINQ queries for NHibernate which contain function calls?

A few weeks ago I decided to switch from using Linq to SQL to use NHibernate instead. (Reasons include: other Java-based projects use Hibernate; target DB not yet decided; multiple DBs may have to be ...
1
vote
1answer
40 views

NHibernate LINQ : Why is a query using the incorrect char value if I repeat the call?

Using NHibernate 3.3.1.4000 / .Net 3.5 I have an object I'm mapping to an existing Oracle 10g database : public MyJob : LegacyOracleDbObjects { public virtual int JobID { get; protected set; } ...
0
votes
1answer
46 views

NHibernate query throws exception, when looking by related table

I have pretty simple linq expression: session.Query<Order>().Where(x => x.States.OrderByDescending(z => z.Date).FirstOrDefault().Name == "2").ToList(); Result: InvalidCastException ...
1
vote
1answer
58 views

How to implement limit with Nhibernate and Sybase

We use Nhibernate 3.3 to connect to our Sybase Ase 15 database. Everything is fine except for the non support of the limit (or top). It is implemented in sybase but not in Nhibernate. Do you have a ...
1
vote
1answer
31 views

Cached Fetch for User Roles from NHibernate in an MVC App

Using classes like this... public class Login { public virtual Guid LoginId { get; set; } public virtual string Name { get; set; } public virtual string Email { get; set; } public ...
0
votes
1answer
55 views

Nhibernate - Table-Valued Functions

I can generate the following SQL: [dbo].[CategoryMatch]([CategoryId], ???) = 1 With the following HQL generator: treeBuilder.Equality(treeBuilder.MethodCall("[dbo].[CategoryMatch]", new[] { ...
1
vote
1answer
92 views

Using methods to project nested DTOs in LINQ

Let's assume that we've got following entity: public class Customer { public virtual int Id { get; set; } public virtual string FirstName { get; set; } public virtual string LastName { ...
0
votes
1answer
96 views

Generic parameter in NHibernate Linq query

Is there any way to compare generic types in linq query to translate to SQL with NHibernate? Something like this: public abstract class DataProviderBase<TDAO, TId> { protected ISession ...
-1
votes
1answer
176 views

LINQ Fluent NHIBERNATE .Contains() does not work in QueryOver<> but works in Query<>

Using FNH, i am trying to retrieve categories, using the following: _session.QueryOver<Data.Model.Category>() .Where(c => ...
0
votes
0answers
67 views

NHibernate Linq query yields no result

I have made a new view in my database, which contains 5 columns. This view have been mapped through an NHibernate HBM file: <?xml version="1.0" encoding="utf-8"?> <hibernate-mapping ...

1 2 3 4 5 30
15 30 50 per page