1 Reply Latest reply on Apr 30, 2012 6:23 PM by Rybicon

    Flash Builder 4.5 Auto-Gen Code For PHP Data Service Produces Errors




      I'm currently running a fresh install of MAMP on my Mac and when I start a new flex project, add a php data service that pulls from a mysql database I have. Everything works fine until I try to compile. The error I'm getting is 'uid' being the primary key which is a bigint(20). The file _Super_Users.as (auto-gen based on the user table below) reports 2 errors: [Managed] requires uid to be of type 'String'. (same error on 2 lines of code) Now the MySQL table wants it to be a int, the auto gen code seems to want it to be an int as well but for some reason its putting in these requires for String on the getter and setters for 'uid'. The is before I even add any of my own code, just auto-gen then compile.



           * data/source property getters




          public function get uid() : int /*error line*/


              return _internal_uid;




           * data/source property setters



          public function set uid(value:int) : void /*error line*/


              var oldValue:int = _internal_uid;

              if (oldValue !== value)


                  _internal_uid = value;




      This is what my database looks when I export it:

      CREATE TABLE `users` (

        `uid` bigint(20) unsigned NOT NULL,

        `name` varchar(150) NOT NULL,

        `first_name` varchar(50) NOT NULL,

        `middle_name` varchar(50) NOT NULL,

        `last_name` varchar(50) NOT NULL,

        `gender` tinyint(1) NOT NULL,

        `locale` varchar(5) NOT NULL,

        `link` varchar(255) NOT NULL,

        `username` varchar(50) NOT NULL,

        `email` varchar(255) NOT NULL,

        `picture` varchar(255) NOT NULL,

        `friends` text NOT NULL,

        `created` datetime NOT NULL,

        `updated` datetime NOT NULL,

        PRIMARY KEY (`uid`)



      It's empty right now...


      • Apache 2.0.64
      • MySQL 5.5.9
      • PHP 5.2.17 & 5.3.5
      • APC 3.1.7
      • eAccelerator
      • XCache 1.2.2 & 1.3.1
      • phpMyAdmin
      • Zend Optimizer 3.3.9
      • SQLiteManager 1.2.4
      • Freetype 2.4.4
      • t1lib 5.1.2
      • curl 7.21.3
      • jpeg 8c
      • libpng-1.5.0
      • gd 2.0.34
      • libxml 2.7.6
      • libxslt 1.1.26
      • gettext
      • libidn 1.17
      • iconv 1.13
      • mcrypt 2.5.8
      • YAZ 4.0.1 & PHP/YAZ 1.0.14

      I tried to give as much info as possible, if you need more let me know...