title: SAPUI5 get OData model in controller
body: <p>i'm making simple project in SAPUI5 and i have some problems with gettin data from OData in controller. I'm guessin if it is possible in js.</p>
  
  <p>I am connected with Northwind.svc by destination.
  I can easily show it in .view file using just "{/Products}", but nothing works in .controller file. 
  I tried to use this.getView().getModel(), creating new sap.ui.model.odata.v2.ODataModel({serviceUrl: "services.odata.org/Northwind/Northwind.svc" });</p>
  
  <p>All the time i want to get propierties i'm just getting null back.</p>
  
  <p>There is piece of my manifest.json file</p>
  
  <pre><code>"sap.app": {
      "dataSources": {
          "Northwind": {
              "uri": "/V2/Northwind/Northwind.svc/",
              "type": "OData",
              "settings": {
                  "odataVersion": "2.0",
                  "localUri": "localService/Northwind/metadata.xml"
              }
          }
      }
  },
  
  "models": {
          "i18n": {
              "type": "sap.ui.model.resource.ResourceModel",
              "settings": {
                  "bundleName": "Odczyty.i18n.i18n"
              }
          },
          "": {
              "type": "sap.ui.model.odata.v2.ODataModel",
              "settings": {
                  "defaultOperationMode": "Server",
                  "defaultBindingMode": "Default",
                  "defaultCountMode": "Request"
              },
              "dataSource": "Northwind",
              "preload": true
          }
  </code></pre>
  
  <p>neo-app.json:</p>
  
  <pre><code>"routes": [
  {
    "path": "/resources",
    "target": {
      "type": "service",
      "name": "sapui5",
      "entryPath": "/resources"
    },
    "description": "SAPUI5 Resources"
  },
  {
    "path": "/test-resources",
    "target": {
      "type": "service",
      "name": "sapui5",
      "entryPath": "/test-resources"
    },
    "description": "SAPUI5 Test Resources"
  },
  {
    "path": "/V2/Northwind/Northwind.svc/",
    "target": {
      "type": "destination",
      "name": "Northwind"
    },
    "description": "Northwind OData Service"
  }
  </code></pre>
  
  <p>]</p>
  
  <p>Component:js</p>
  
  <pre><code>init: function() {
          // call the base component's init function
          UIComponent.prototype.init.apply(this, arguments);
  
          // set the device model
          this.setModel(models.createDeviceModel(), "device");
      }
  </code></pre>
  
  <p>models.js:</p>
  
  <pre><code>return {
  
      createDeviceModel: function() {
          var oModel = new JSONModel(Device);
          oModel.setDefaultBindingMode("OneWay");
          return oModel;
      }
  };
  </code></pre>
  
  <p>Any ideas what i'm doing wrong?</p>