queryover Questions

2

Solved

I've got this example code... Result = session.QueryOver<Lfee_Exc>().WhereRestrictionOn(x => x.FirstName) .IsIn(ListOfFirstNames).List(); Is there any way to make this case insenstive o...
Marquetry asked 29/3, 2011 at 20:39

6

Solved

The following line fails with a null reference, when testing: var awards = _session.QueryOver<Body>().Where(x => x.BusinessId == (int)business).List(); My test is like so: var mockQuer...
Camembert asked 22/9, 2011 at 11:0

5

Solved

I am playing with FluentNHibernate and NH 3.0, using the LINQ provider and the new QueryOver syntax. Now with QueryOver I want to get an item (called result) with a timestamp value as close as po...
Ly asked 29/12, 2010 at 13:23

2

Solved

How to do the following join to return Users who have access to a Company given a company id. The problem is there is no explicit relationship using a User object between UserAccess and User they s...
Magnet asked 16/8, 2011 at 10:7

2

Solved

Though I was reading through the NHibernate Cookbook and all available forum-posts up and down, I'm still not able to get this simple query done: I have users with everyone having one account. Eac...
Stupefy asked 16/6, 2011 at 15:38

3

Solved

I have the following query working which gets the results I want: int associatedId = 123; MyObject alias = null; var subQuery = QueryOver.Of<DatabaseView>() .Where(view => view.Associat...
Clamorous asked 16/6, 2011 at 20:32

7

Solved

I'm trying to generate SQL along the lines of: SELECT t.*, SELECT (...) FROM Title t [trimmed] using QueryOver Title title = null; var q = session .QueryOver(() => title) .Select( Pr...
Spray asked 23/4, 2011 at 7:34

2

Solved

I have read a lot of the questions about that same error but none since to match my exact problem. I'm trying to access the property of an object, itself part of a root object, using Fluent NHibern...
Siderite asked 17/12, 2014 at 14:6

2

Solved

I have to do a search to return a value , I have to do is the sum of multiplying two fields. I have the following code: internal double TotalRes(long Id) { double total = 0; Reserve rAlias = nul...
Condenser asked 24/8, 2015 at 13:7

3

Solved

I use the follow QueryOver: var query = searchTermRepository.GetAllOver() .Where(Restrictions.On<Entities.SearchTerm>(c => c.Text).IsLike(filter.Value, MatchMode.Start)) .Select(Project...
Felonious asked 25/5, 2011 at 16:46

2

I have this Repository method which uses QueryOver API public IList<Message> ListMessagesBy(string text, IList<Tag> tags, int pageIndex, out int count, out int pageSize) { pageSize ...
Ulm asked 6/1, 2011 at 19:0

3

Solved

I have an object model that looks like this (pseudo code): class Product { public ISet<Product> Recommendations {get; set;} public ISet<Product> Recommenders {get; set;} public ISet...
Coulson asked 6/3, 2011 at 5:55

6

Solved

I am trying get a record updated from database with QueryOver. My code initially creates an entity and saves in database, then the same record is updated on database externally( from other program,...
Spike asked 4/4, 2013 at 6:58

1

iam trying a new query with nhibernate and find a new problem :( take this as model: public class D { int id; } public class C { int id; } public class B { int id; ICollection<C> Cs; ICo...
Indebtedness asked 21/3, 2017 at 14:5

5

Solved

I am trying to build a simple query in nHibernate with QueryOver but I want it to convert everything lower-case or ignore sensitive: Domain.User User = Session.QueryOver<Domain.User>() .Whe...
Baht asked 9/3, 2011 at 10:39

3

Solved

Having a query like the following: var subquery = SessionFactory.GetCurrentSession() .QueryOver<SomeEntity>() .Where(_ => _.SomeOtherEntity.Id == someId) .SelectList(list => list ....
Keynote asked 18/6, 2015 at 10:37

2

I found 2 similar questions: Multiple Fetches in linq to nhibernate Is this the right way of using ThenFetch() to load multiple collections? According to this page: Be careful not to eagerly...
Cudgel asked 28/4, 2011 at 6:13

2

Solved

How can I add groupby Id to this nhibernate code because I'm new with it and there is many way but none work for me. .Select(Projections.Sum(() => ServiceOrderItem.WorkTime), Projections.Proj...
Console asked 15/5, 2012 at 14:8

2

Solved

What I'm trying to come up is something that's expressed like this: var result = Session.QueryOver<Foo>().OrderBy(f => f.UpdatedAt ?? f.CreatedAt); Sure enough, this doesn't work. Rough...
Montgolfier asked 27/4, 2011 at 13:7

1

Solved

I'm trying to use the SQL function CONSTAINS to filter some data on QueryOver API. The main issue is i can't use SqlFunction in where clause, it does not compile, because a ICriterion is needed. ...
Deprecate asked 31/7, 2015 at 0:1

1

Solved

I have a problem in QueryOver where using Group by and have some criteria in where clause. Want to move some criteria with SUM() values in Having clause but every time it appears in Where clause an...
Misconceive asked 10/4, 2015 at 15:55

3

I'm looking to add a method to my base repository class that allows me to use LIKE expressions but I'm not quite sure of how to go about this. I want to create a generic method that looks at the ex...
Fiddlehead asked 17/1, 2012 at 0:6

1

Solved

To start, yes, there are tons of similar questions here on Stack Overflow, but I've browsed them all and the problems that plague most of them look correct on my issue. Basically, I'm trying to ac...
Ringside asked 17/10, 2014 at 23:57

2

Solved

I need to know what is the difference between JoinQueryOver and JoinAlias, and when to use each?
Reest asked 24/3, 2011 at 8:33

1

Solved

I am using Nhibernate. I am writing query through queryover method. I am able to write and clause as in code below. Its working fine. db.QueryOver(Of Users)() .Where(Function(x) x.Role = "Guest"...
Hueyhuff asked 18/7, 2014 at 4:38

© 2022 - 2024 — McMap. All rights reserved.