首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > flex >

blazeds 传递对象实例,该怎么处理

2012-03-21 
blazeds 传递对象实例我后台传过来一个Java codepackage net.carefx.cp.persistence.domain@Entity@Table

blazeds 传递对象实例
我后台传过来一个 

Java code
package net.carefx.cp.persistence.domain;@Entity@Table (name = "CP_ITEM", schema = "dbo", catalog = "FusionCP")public class Item extends BaseDomain implements Serializable{。。。    @OneToMany (mappedBy = "item", cascade = CascadeType.ALL, fetch = FetchType.EAGER)    public Set <ItemMapping> getItemMappings ()    {        return itemMappings;    }    public void setItemMappings (Set <ItemMapping> itemMappings)    {        this.itemMappings = itemMappings;    }}package net.carefx.cp.persistence.domain;@Entity@Table (name = "CP_ITEM_MAPPING", schema = "dbo", catalog = "FusionCP")public class ItemMapping extends BaseDomain implements Serializable{。。。    @OneToMany (mappedBy = "itemMapping", fetch = FetchType.EAGER, cascade = CascadeType.ALL)    public Set <ItemMappingProps> getItemMappingPropss ()    {        return itemMappingPropss;    }    public void setItemMappingPropss (Set <ItemMappingProps> itemMappingPropss)    {        this.itemMappingPropss = itemMappingPropss;    }}package net.carefx.cp.persistence.domain;@Entity@Table (name = "CP_ITEM_MAPPING_PROPS", schema = "dbo", catalog = "FusionCP")public class ItemMappingProps extends BaseDomain implements Serializable{。。。}

然后我在 FLEX 也写了 Item.as ItemMapping.as ItemMappingProps.as 的对应对象 
为什么 我前台得到的 对象 
Item有 ItemMapping
就ItemMappingProps这个为 object 为什么会 没对应上去 ?。。。
我查来查去查不出来 你们 有没有 办法能查出来 或者 
可能 哪方面 出错了

[解决办法]
先确认下flex里面的ItemMappingProps.as里面是否写的正确
[RemoteClass(alias="net.carefx.cp.persistence.domain.ItemMappingProps")]
public class ItemMappingProps
并且对比JavaModel和FlexModel里面的属性对应是否正确

再看一下java里面的ItemMappingProps的Serializable分配的code让他重新自动分配一次。

热点排行