Quantcast

Problem with criteria in 2.0

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Problem with criteria in 2.0

Finn Herpich-3
Hi all,

first thanks for the great work.

I'm migrating our 1.3.7 app currently to 2.0 and this criteria stopped
working:
List arrays = SignalArray.createCriteria().list {
             and {
                 or {
                     and {
                         ge('firstSignal', startDate)
                         le('firstSignal', endDate)
                     }
                     and {
                         le('lastSignal' , endDate)
                         ge('lastSignal' , startDate)
                     }
                 }
                 gt('distance' , 0.0.toDouble())
                 'in'('tracker', user.account?.trackers)
             }
             order("firstSignal", "asc")
             order("lastSignal" , "asc")
         }

with
could not resolve property: distance of: tracker.SignalArray. Stacktrace
follows:
Message: could not resolve property: distance of: tracker.SignalArray
     Line | Method
->> 1515 | invokeMethod     in grails.orm.HibernateCriteriaBuilder
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|     57 | doCall           in portal.ArchiveController$_closure3$$ENJB7s36


The property distance definitly exists and exact this piece of code
worked before in 1.3.7.
Any ideas?

Cheers
Finn

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Problem with criteria in 2.0

Graeme Rocher-4
Administrator
Could you raise an JIRA with an example?

Thanks

On Thu, Dec 15, 2011 at 8:17 PM, Finn Herpich <[hidden email]> wrote:

> Hi all,
>
> first thanks for the great work.
>
> I'm migrating our 1.3.7 app currently to 2.0 and this criteria stopped
> working:
> List arrays = SignalArray.createCriteria().list {
>            and {
>                or {
>                    and {
>                        ge('firstSignal', startDate)
>                        le('firstSignal', endDate)
>                    }
>                    and {
>                        le('lastSignal' , endDate)
>                        ge('lastSignal' , startDate)
>                    }
>                }
>                gt('distance' , 0.0.toDouble())
>                'in'('tracker', user.account?.trackers)
>            }
>            order("firstSignal", "asc")
>            order("lastSignal" , "asc")
>        }
>
> with
> could not resolve property: distance of: tracker.SignalArray. Stacktrace
> follows:
> Message: could not resolve property: distance of: tracker.SignalArray
>    Line | Method
> ->> 1515 | invokeMethod     in grails.orm.HibernateCriteriaBuilder
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> |     57 | doCall           in portal.ArchiveController$_closure3$$ENJB7s36
>
>
> The property distance definitly exists and exact this piece of code worked
> before in 1.3.7.
> Any ideas?
>
> Cheers
> Finn
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>



--
Graeme Rocher
Grails Project Lead
SpringSource - A Division of VMware
http://www.springsource.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Problem with criteria in 2.0

Finn Herpich-3
Sure, I'll try to reproduce this in a smaller version.

On 12/15/2011 08:40 PM, Graeme Rocher wrote:

> Could you raise an JIRA with an example?
>
> Thanks
>
> On Thu, Dec 15, 2011 at 8:17 PM, Finn Herpich<[hidden email]>  wrote:
>> Hi all,
>>
>> first thanks for the great work.
>>
>> I'm migrating our 1.3.7 app currently to 2.0 and this criteria stopped
>> working:
>> List arrays = SignalArray.createCriteria().list {
>>             and {
>>                 or {
>>                     and {
>>                         ge('firstSignal', startDate)
>>                         le('firstSignal', endDate)
>>                     }
>>                     and {
>>                         le('lastSignal' , endDate)
>>                         ge('lastSignal' , startDate)
>>                     }
>>                 }
>>                 gt('distance' , 0.0.toDouble())
>>                 'in'('tracker', user.account?.trackers)
>>             }
>>             order("firstSignal", "asc")
>>             order("lastSignal" , "asc")
>>         }
>>
>> with
>> could not resolve property: distance of: tracker.SignalArray. Stacktrace
>> follows:
>> Message: could not resolve property: distance of: tracker.SignalArray
>>     Line | Method
>> ->>  1515 | invokeMethod     in grails.orm.HibernateCriteriaBuilder
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> |     57 | doCall           in portal.ArchiveController$_closure3$$ENJB7s36
>>
>>
>> The property distance definitly exists and exact this piece of code worked
>> before in 1.3.7.
>> Any ideas?
>>
>> Cheers
>> Finn
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Problem with criteria in 2.0

Finn Herpich-3
I've narrowed it down (I guess) and created an issue ( http://jira.grails.org/browse/GRAILS-8498)

Hope it helps =)

Cheers

On 12/15/2011 08:53 PM, Finn Herpich wrote:
Sure, I'll try to reproduce this in a smaller version.

On 12/15/2011 08:40 PM, Graeme Rocher wrote:
Could you raise an JIRA with an example?

Thanks

On Thu, Dec 15, 2011 at 8:17 PM, Finn Herpich[hidden email]  wrote:
Hi all,

first thanks for the great work.

I'm migrating our 1.3.7 app currently to 2.0 and this criteria stopped
working:
List arrays = SignalArray.createCriteria().list {
            and {
                or {
                    and {
                        ge('firstSignal', startDate)
                        le('firstSignal', endDate)
                    }
                    and {
                        le('lastSignal' , endDate)
                        ge('lastSignal' , startDate)
                    }
                }
                gt('distance' , 0.0.toDouble())
                'in'('tracker', user.account?.trackers)
            }
            order("firstSignal", "asc")
            order("lastSignal" , "asc")
        }

with
could not resolve property: distance of: tracker.SignalArray. Stacktrace
follows:
Message: could not resolve property: distance of: tracker.SignalArray
    Line | Method
->>  1515 | invokeMethod     in grails.orm.HibernateCriteriaBuilder
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|     57 | doCall           in portal.ArchiveController$_closure3$$ENJB7s36


The property distance definitly exists and exact this piece of code worked
before in 1.3.7.
Any ideas?

Cheers
Finn

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Loading...