CMP是不行的!!
不过可以这样,将一张表(父表)中的一些字段抽取出来定义为另外一张表(子表),估计就可以了!!

解决方案 »

  1.   

    单纯的CMP是不行的,不过可以通过关系映射得到
      

  2.   

    to wabby(若水)
       BMP的有没有现成的例子给我一份[email protected]  ll42002(灰舌) &&  baitianhai(hong) 
       能否具体一点或有代码?附:分不是问题,多的是
      

  3.   

    建一个view,然后CMP对应这个VIEW
      

  4.   

    to accp(只有在梦醒的时候才知道自己是做了一个梦) 
    你说的这个view怎么创建呢?
      

  5.   

    可以
    IBM Redbook SG24-6819-00
    EJB 2.0 Development with WebSphere Studio Application Developer.pdfChapter 12. Mapping strategies for CMPs
    Mapping examples
    Mapping a CMP to multiple tablesAn entity, such as Customer , can be mapped to two (or more) tables that are in a
    1:1 relationship. As shown in “Change the model” on page 473 (bottom-up
    mapping), we can map the combined attributes of the Customer attributes to two
    tables, CUSTOMER and CUSTADDRESS
      

  6.   

    to accp(只有在梦醒的时候才知道自己是做了一个梦)
    建view我会,怎么把这个视图和EntityBean对照起来?为什么有这么多你说的SB来问我这个问题呢?真郁闷
      

  7.   

    我倒郁闷了,你把这个VIEW当一个表看,
    你EntityBean怎么对应表的就怎样对应视图
    是哪两个SB公司这样要求?
    要是我我就说我没这样做过,有必要这样吗?
    既然你想让它们在一块又何必设计成两个表~
      

  8.   

    这样的公司就是有病,既然能做成更新的视图干吗要搞两个表那,shit