7 Replies Latest reply on Jul 22, 2010 10:02 AM by heyitsjuan

    AIR 1.5.2 vs AIR 2.0 outer left join - column name issues

    JMSTrilsoft Level 1

      Hi All,

      I was wondering if anyone has seen this or know a workaround to this issue.

      After a machine got updated to AIR 2.0 our apps started to fail. Upon further inspection I discovered that the column names in the return results from an SQLite query using "outer left join" were different between AIR 1.5.2 and AIR 2.0.

      Here's my proof of concept: (I attempted to make this as sort as possible but reproduce the issue)

      private function runTest():void{
                          var conn:SQLConnection = new SQLConnection();
                          var stmt:SQLStatement = new SQLStatement();
                          var res:Array = [];
                          stmt.text = "SELECT tableOne.int, tableAlias.varchar " + 
                                    "from tableOne " + 
                                    "outer left join (SELECT * FROM tableTwo) as tableAlias " + 
                                    "on (tableOne.int == tableAlias.int)";
                          conn.open(File.applicationDirectory.resolvePath("tempdb.db"));
                          stmt.sqlConnection = conn;
                          stmt.execute();
                          conn.close();
                          res = stmt.getResult().data as Array
                          trace(ObjectUtil.toString(res));
                     }
      

       

      AIR 1.5.2 trace results:

      (Array)#0

        [0] (Object)#1

          tableAlias_varchar = "apple"

          tableOne_int = 0

        [1] (Object)#2

          tableAlias_varchar = "boat"

          tableOne_int = 1

        [2] (Object)#3

          tableAlias_varchar = "cat"

          tableOne_int = 2

       

      AIR 2.0 trace results:

      (Array)#0

        [0] (Object)#1

          int = 0

          varchar = "apple"

        [1] (Object)#2

          int = 1

          varchar = "boat"

        [2] (Object)#3

          int = 2

          varchar = "cat"