Re: Model Refactor, move table from one Map to Another

From: Evgeny Ryabitskiy (evgeny.ryabitski..mail.com)
Date: Thu Oct 01 2009 - 17:24:01 EDT

  • Next message: Mike Kienenberger: "Re: Model Refactor, move table from one Map to Another"

    2009/10/2 <han..elinux.cl>:
    > Hi List,
    >
    > In order to reuse some logic i'm trying to refactor an old model and i was wondering if there is a way to move a Table and its associated Entity from one map to another, i'm using just one domain.
    >
    > I tried in the last 3.0M6 modeler, the cut & paste looks very nice, i was crossing my fingers, but after the move, all the object and db relationships gets broken, the tables i'm trying to refactor have lots of relationships. May be somebody has writen some script or knows of some guide for doing this ?
    >
    > Thanks
    > Hans
    >

    Hello!

    As an instant solution I can advise you to open "*.map.xml" for your
    both maps and copy-paste everything connected to your Table from one
    xml file to another. It's common XML, I's not so hard, believe me.
    If you wish to do it in more automatic way, write your XML-parser that
    is looking for all Table relations and coping them. Also not so hard.
    After it you can contribute you Table-Transporter to Cayenne modeler
    as a refactor extension ;)

    Still a chance that some one else from List share with you such tool....

    Best regards,
     Evgeny Ryabitskiy.



    This archive was generated by hypermail 2.0.0 : Thu Oct 01 2009 - 17:25:27 EDT