grails / grails-core

The Grails Web Application Framework
http://grails.org
Apache License 2.0
2.78k stars 949 forks source link

GRAILS-2311: CritieraBuilder doesnt descend well #7080

Closed graemerocher closed 9 years ago

graemerocher commented 16 years ago

Original Reporter: bob@jadn.com Environment: Not Specified Version: 1.0-RC4 Migrated From: http://jira.grails.org/browse/GRAILS-2311

Briefly, this works,

def criteria = TestExecution.createCriteria()        
    def results = criteria {
        createCriteria("testRun").createCriteria("environment").createCriteria("env").add(Restrictions.eq("name","DEVB"))
    }
    println ("Got "+results.size())

This doesnt

def criteria = TestExecution.createCriteria()        
    def results = criteria {
             testRun { environment{ env { eq("name","DEVB") } }
    }
    println ("Got "+results.size())

and I believe they should be the same. It seems like when the CriteriaBuilder the problem happens trying to dispatch on 'environment' so I wonder if the result of "testRun" doesnt create a criteria.

graemerocher commented 16 years ago

graemerocher said: Please attach a sample domain model and test

graemerocher commented 15 years ago

bob@jadn.com said: are you still seeking a code sample to demonstrate this problem?

graemerocher commented 15 years ago

graemerocher said: Yes please

graemerocher commented 15 years ago

bob@jadn.com said: An attempt to create a test case using the supplied information was unsuccessful.

graemerocher commented 13 years ago

graemerocher said: Bulk closing bunch of resolved issues