views:

268

answers:

2

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 !

A: 

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.

Thommas