0

我正在使用以下网站开发一个网站: - Flex 3.4 - AMFPHP 1.9b - Propel 1.3 - PHP/MySQL

我的问题真的很奇怪,我一直在花费数小时试图知道它来自哪里。

我将尝试关注发生在整个系统中的问题。

总而言之,我有 2 个实体(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;

我检索了我所有的 BBB,它们从 PHP 类(由 Propel 生成)映射到 Flex 端的 AS3 类。

但是当我在数据库中创建一个 AAA 行时。

我检索了我的所有 BBB,并且所有对象都被映射,除了其 id 对应于插入的 AAA 行中的外键的 BBB。

我真的不知道为什么以及如何......如果你知道 AMFPHP / Propel / Flex 如何处理外键以及为什么类映射在这里失败。

奇怪的是,它似乎只发生在这种特定情况下......

谢谢 !

4

1 回答 1

0

进行批量调用时类映射失败!

我读了这篇文章以引导我找到解决方案: http ://amfphp.sourceforge.net/docs/commonerrors.html

当使 AMFPHP 远程对象调用一次时,对象被正确映射。

于 2009-09-25T13:48:21.347 回答