queryover Questions
1
I have to try finding results based on search, which should be startswith, but I cannot find QueryOver which has startswith, is there any otherway ?
public IEnumerable<Company> Find(string k...
Cant asked 30/6, 2014 at 8:13
4
I have a simple database with users table, it have simple admin user with
UserName= "Admin"
Password="admin"
I am using NHibernate to query over this table to login form.
Suppose the login f...
Plight asked 21/5, 2014 at 12:37
4
Solved
I'm trying to do this :
var list = Session.QueryOver<Person>()
.Where(x => x.LastName.Contains(searchText))
.List<Person>();
but I get this error : Unrecognised method call: Sys...
Spearman asked 22/7, 2012 at 15:36
2
EDIT I remade an entire project for this one problem. And thus, I remade the question.
I want to be able to efficiently avoid N+1 and Cartesian joins joining together a 4 level deep entity with a ...
Tumer asked 28/1, 2012 at 1:8
1
Solved
I have used too much time to find a nice way to eager load child collections. so far this is what I got. It's working but I find it hard to believe that this is the best way to write this query
[...
Copyboy asked 25/11, 2013 at 17:16
1
Solved
I'm trying to select an entity and fetch a related list:
Session.QueryOver<UserRole>()
.Fetch(x => x.UsersInRole).Eager
.List();
Which results in a lot of database hits.
The first on...
Romain asked 9/10, 2013 at 22:58
2
Solved
Hi StackOverflow users,
I ran into this problem
I have three QueryOvers and each of them returns a list of candidate ids that I then use to bring those candidates.
For this I wrote the following ...
Flasket asked 3/10, 2012 at 11:18
2
Solved
I have a DTO object like this:
public class TreeViewDTO
{
public string Value { get; set; }
public string Text { get; set; }
public bool HasChildren { get; set; }
}
and my entity mapped with ...
Haemolysin asked 10/4, 2013 at 17:9
1
Solved
So I've spent the last few hours looking for an answer and I can't seem to find anything that makes sense.
public class Game
{
public virtual Guid ID { get; set; }
public virtual ResultStructure...
Publish asked 14/2, 2013 at 12:28
1
Solved
I'm trying to write this specific sql query in nHibernate QueryOver language, which I am not very familiar with:
SELECT MessageThreadId FROM MessageThreadAccesses
WHERE ProfileId IN (arr)
GROUP BY...
Elis asked 30/1, 2013 at 10:40
2
Solved
I'm refactoring old-style query CreateCriteria() to QueryOver(). My Wcf service gets string PropertyName to order queries results. For IQueryable I use Dynamic LINQ to do such ordering, for CreateC...
Spica asked 13/8, 2012 at 13:34
1
Solved
I am trying to use hibernate annotations to insert data to a MySQL database table which doesn't have a primary key defined.
However the fact is 2 fields of that table together are unique in the t...
Alkalize asked 18/12, 2012 at 15:36
2
Solved
I have a fairly run-of-the-mill QueryOver query containing the following,
.SelectList(list => list
.SelectGroup(() => txn.GroupField)
.SelectGroup(() => txn.Date))
.List<object[]>...
Leda asked 6/7, 2011 at 0:56
1
Solved
Is it possible to convert this code at below, written by using Query(linq) api to Criteria or QueryOver API in NHibernate? I'm using this to format data into DTO's also it works with just one round...
Woodsman asked 10/12, 2012 at 14:56
4
Solved
I'm using the QueryOver api that is part of NHibernate 3.x. I would like to get a row count, but the method I'm using returns all objects and then gets the count of the collection. Is there a way t...
Gard asked 22/3, 2010 at 1:28
2
Solved
This is my scenario:
public IEnumerable<ISuperMerc> getSuperMercTree(string IDLanguage)
{
SuperMercModel SMer = null;
SuperMercDescriptionModel descrSMer = null;
MercModel Merc = null;...
Stagecraft asked 3/11, 2011 at 17:24
1
Solved
I have this tables:
Person -> PersonFavorites, PersonCompany
PersonCompany -> Company
I have now to do the following select with NHibernate and QueryOver:
select * from Person
inner joi...
Greatest asked 29/9, 2012 at 10:50
1
Solved
I hit a situation today where a field in our legacy db that should never be empty... was empty.
I am using NHibernate 3.2 against this database and the queries that are affected are written in Que...
Mcbryde asked 28/9, 2012 at 17:1
1
Solved
How can I perform the following LINQ to NHibernate query using the QueryOver API. This gets a list of all records of Item from the DB and places Items with the status "Returned" to the end of the l...
Invincible asked 14/9, 2012 at 16:4
1
Solved
I could really use some guidance on how to take this sql query to NHibernate QueryOver. My attempts were to use Linq as I am a bit more familiar with Linq. The project we are working on is using Qu...
Shutz asked 1/9, 2012 at 18:33
1
Solved
I want to simulate this query:
SELECT * FROM FOO WHERE ID IN (1,2,3)
How can I do this in FNH?
var ids = new List<int>{1,2,3};
var results = session.QueryOver<Foo>().Where( x=> i...
Mcardle asked 28/8, 2012 at 8:10
1
Solved
I'll just post the code:
public IList<Dish> GetByNameDishTypes(IEnumerable<string> names,
IEnumerable<string> dishTypes)
{
// return dishes (ie food) whose name is in the names...
Gascon asked 19/8, 2012 at 21:55
3
I have a query by QueryOver in Nhibernate3.1
var q = SessionInstance.QueryOver<Person>()
.Where(x => IsActive(x.PersonType) == true);
return q.List<Person>();
By this method:
...
Enlarger asked 21/2, 2012 at 12:37
1
Solved
I am trying to write QueryOver statement for selecting N rows in the descending time order.
session.QueryOver<T>().Take(10).OrderBy(x=>x.DateInserted);
Unfortunately this is not at all ...
Brierwood asked 23/6, 2012 at 18:35
3
How can I write the following SQL statement using QueryOver<> syntax?
SELECT COUNT(*) FROM (
SELECT FirstName,LastName
FROM People
GROUP BY FirstName, LastName
) as sub_t
I have the inn...
Talbert asked 3/8, 2011 at 18:23
© 2022 - 2024 — McMap. All rights reserved.