createcriteria Questions
4
Solved
If I want to search those students who take class "Math" and "John" is his group:
shoud I use createCriteria or createAlias?
Criteria:
Criteria criteria = session.createCriteria(Student.class);
...
Evanevander asked 27/2, 2010 at 12:51
3
I have a domain object (Cat) like this:
class Cat {
String name
static hasMany = [
nicknames: String
]
}
(A cat has a name, and also has many nicknames (which are Strings))
And I am trying...
Custer asked 23/9, 2011 at 14:57
1
Solved
It seems that in Grails 2.x, if you have a domain class association, and you try to run a createCriteria using or on that relation + another query, the or will ignore the other query and just use t...
Convexity asked 15/10, 2013 at 20:45
2
Solved
When using projection on the properties, the result is returned as the list with the elements in the same sequence as that defined in the projections block. At the same time the property names are ...
Mcfarlane asked 7/11, 2012 at 0:40
3
Is it possible, to query grails with criteria and receive a list of maps instead of a list of lists? I would like to have the column names in the results in order to then work with an 'associative ...
Unswear asked 7/2, 2012 at 22:3
1
Solved
I'm working on building a createCriteria dynamically. So far, so good:
obj is the domain object(s) I want back
rulesList is a list of maps which hold the field to be searched on, the operator to u...
Epicardium asked 18/7, 2012 at 21:18
1
Solved
I have an Auction domain object and a User domain object. An Auction hasMany Users.
What I'd like to do, using createCriteria, is something like this:
def c = Auction.createCriteria()
def l = c.l...
Melloney asked 13/7, 2012 at 17:0
1
Solved
I am using HibernateCriteriaBuilder api to write my Criteria Queries. I want to know if inside Criteria we can have conditional logic, such as an if statement?
For example:
OnemonthList=it.creat...
Poynter asked 30/1, 2012 at 2:28
3
Solved
How can I write the following SQL using CreateCriteria:
SELECT * FROM FooBar fb
WHERE EXISTS (SELECT FooBarId FROM Baz b WHERE b.FooBarId = fb.Id)
Barnacle asked 18/11, 2009 at 0:14
1
© 2022 - 2024 — McMap. All rights reserved.