+ Reply to Thread
Results 1 to 4 of 4

Thread: AMFPHP Flex Propel Mapping class ultra-weird bug

  1. Join Date
    Sep 2009
    Age
    25
    Posts
    4

    AMFPHP Flex Propel Mapping class ultra-weird bug

    Source :
    http://stackoverflow.com/questions/1...ltra-weird-bug

    Help !



    Hello,

    I'm working on a website using : - Flex 3.4 - AMFPHP 1.9b - Propel 1.3 - PHP/MySQL

    My problem is really strange and I've been spending hours trying to know where it comes from.

    I'll try to focus on the problem which takes place in a whole system.

    To sum up, I have 2 entities (MySQL) :

    create table AAA
    (
    id_AAA int not null auto_increment,
    id_BBB int,
    primary key (id_AAA)
    )
    type = innodb;

    create table BBB
    (
    id_BBB int not null auto_increment,
    )
    type = innodb;

    alter table AAA add constraint fk_AAA_BBB foreign key (id_BBB)
    references spot (id_BBB) on delete cascade on update cascade;

    I retrieve all my BBB, they are mapped from PHP classes (generated by Propel) to AS3 classes on the Flex side.

    But when I create a AAA row in the database.

    I retrieve all my BBB, and all objects are mapped EXCEPT the BBB whose id corresponds to the foreign key in the inserted AAA row.

    I really have no clue about why and how ... if you know anything about how AMFPHP / Propel / Flex are dealing with Foreign Keys and why class mapping is failing right here.

    The weird thing is that it seems to happen only for this specific case ...

    Thank you !

  2. Join Date
    Sep 2009
    Age
    25
    Posts
    4
    The problem is only coming from the Flex side.

    The problem is still weird.
    The object is instantiated somewhere else in the code, then class mapping fails for the object which is 100% similar !

    This has nothing to do with static variables ?

    This might be something deeper that I did not understand in Flex...

  3. Join Date
    Sep 2009
    Age
    25
    Posts
    4
    Please see this :
    First instantiation of the spot object
    http://thommas.free.fr/FlexBug1.jpg
    Second instantiation of the spot object failing
    http://
    thommas.free.fr/FlexBug2.jpg

  4. Join Date
    Sep 2009
    Age
    25
    Posts
    4
    Class mapping is failing when making batch calls !

    I read this to lead me to a solution :
    http://amfphp.sourceforge.net/docs/commonerrors.html

    When make AMFPHP remote object call one at the time, the objects are correctly mapped.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts