0 Replies Latest reply on Sep 22, 2009 7:40 AM by ThiagoFelix

    Coldfusion 9 - Offline AIR Application Support

    ThiagoFelix

      Hello.
      Im developing a enterprise application using Coldfusion 9 and Adobe
      AIR. I Know that is in Beta version, but many new features of CF9 provide to us a great support, especially as relates to the data synchronization and access SQLite. Im trying to use the Actionscript Persistence Framework, and after see some tutorials like these i start mapping my classes to database SQLite, but i got a error when i make a OneToMany relashionship using a ArrayCollection type to represents the data. See the example below.



      [OneToMany(targetEntity="br.

      com.***.AtaAircraft",mappedBy="aircraft")]
      [Bindable]
      public var atas:ArrayCollection = new ArrayCollection();

       

      I got a runtime error:

       

      Error: The field type on the OneToMany tag on atas has to be an Array in class br.com.embraer.msg3.entities::Aircraft
          at coldfusion.air::EntityCache/handleFieldList()[D:\p4\depot\ColdFusion\cf_main\tools\AIRIntegration\OfflineSupport\src\coldfusion\air\EntityCache.as:679]
          at coldfusion.air::EntityCache/addMetadata()[D:\p4\depot\ColdFusion\cf_main\tools\AIRIntegration\OfflineSupport\src\coldfusion\air\EntityCache.as:299]
          at coldfusion.air::EntityCache/getMetaData()[D:\p4\depot\ColdFusion\cf_main\tools\AIRIntegration\OfflineSupport\src\coldfusion\air\EntityCache.as:199]
          at coldfusion.air::Session/loadByPKInternal()[D:\p4\depot\ColdFusion\cf_main\tools\AIRIntegration\OfflineSupport\src\coldfusion\air\Session.as:1991]
          at coldfusion.air::Session/loadByPK()[D:\p4\depot\ColdFusion\cf_main\tools\AIRIntegration\OfflineSupport\src\coldfusion\air\Session.as:1981]
          at coldfusion.air::Session/saveUpdateCallCache()[D:\p4\depot\ColdFusion\cf_main\tools\AIRIntegration\OfflineSupport\src\coldfusion\air\Session.as:994]
          at coldfusion.air::Session/saveUpdate()[D:\p4\depot\ColdFusion\cf_main\tools\AIRIntegration\OfflineSupport\src\coldfusion\air\Session.as:970]
          at br.com.embraer.msg3.dao::AircraftDAO/saveOrUpdate()[C:\Users\Thiago\workspace_msg3\msg3\MSG_Library\src\br\com\embraer\msg3\dao\AircraftDAO.as:34]
          at teste/load()[C:\Users\Thiago\workspace_msg3\msg3\MSG_Client\src\teste.mxml:45]
          at teste/canvas1_creationCompleteHandler()[C:\Users\Thiago\workspace_msg3\msg3\MSG_Client\src\teste.mxml:63]
          at teste/___teste_Canvas1_creationComplete()[C:\Users\Thiago\workspace_msg3\msg3\MSG_Client\src\teste.mxml:3]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9308]
          at mx.core::UIComponent/set initialized()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1169]
          at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
          at Function/http://adobe.com/AS3/2006/builtin::apply()
          at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8633]
          at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8573]

       


      I really wont use array in my collections =\

      att