3 Replies Latest reply on Apr 4, 2014 4:41 AM by Ruben Ruben

    ORM Model Javascript - ordering find results not working?

    Ruben Ruben

      Hi,

      I'm trying to get the results of a find query ordered by date using the ORM Javascript API, but when I try, find stops working:

       

      TypeError: Object #<Object> has no method '$[]' at Function.$find (http://localhost:35632/public/api/rhoapi- modules.js:7813:70) at Object.find (http://localhost:35632/public/api/rhoapi-modules.js:1151:33) at Object.query (http://localhost:35632/app/factories/AppointmentFactory.js:112:29) at Object.<anonymous> (http://localhost:35632/app/factories/AppointmentFactory.js:181:29) at Object.invoke (http://localhost:35632/public/js/angular.js:3720:17) at http://localhost:35632/public/js/angular.js:3562:37 at getService (http://localhost:35632/public/js/angular.js:3683:39) at invoke (http://localhost:35632/public/js/angular.js:3710:13) at Object.instantiate (http://localhost:35632/public/js/angular.js:3731:23) at http://localhost:35632/public/js/angular.js:6848:28 <div class="container ng-scope" data-ng-view="">


      My find query:

      var objs = appointment.find("all", {order: "date"});


      My date attribute is a string in RFC3339-ish date format: YYYY-MM-DD.


      Thanks.


      PS: I saw that version 4.1 just came out, if this is a bug, is it fixed in 4.1?