cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny Ryabitskiy <evgeny.ryabits...@gmail.com>
Subject Re: Model Refactor, move table from one Map to Another
Date Thu, 01 Oct 2009 21:24:01 GMT
2009/10/2  <hans@welinux.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.

Mime
View raw message