Right, so, if you click on "To DB", you should be able to change that
to "To Model", right?
I just tried it... although I was using a snapshot version of the
modeler, so take ti with a grain of salt. :)
Robert
On Apr 9, 2009, at 4/93:14 PM , Weddle, Anthony wrote:
> Sorry, Robert, but I don't get any operations that have the
> direction of
> DB to map. For example, using the a Derby database, I added an
> attribute
> to a table called "EXTRA", in Modeler, and added a new table,
> "RESTAURANTS", to the database (using ij in Eclipse). These are the
> operations that Migrate gave me:
>
> To DB | Add Column | EXTRA.ANOTHER_FLAG
> To DB | Drop Table | RESTAURANTS
>
> And that's it. I tried a similar change with an Oracle DB and still
> didn't get any operations for pulling DB changes into the map.
>
> But our situation is a little different from this example. We will
> rarely add tables but we will alter columns and sometimes add columns.
> In the meantime, we'd also make changes to the ObjEntity, such as
> changing the Java type, or the optimistic locking flag, or a
> relationship delete rule, or how keys are generated. So, we'd like to
> have the capability to pull in database schema changes but keep the
> local customisations that we've made, without a lot of manual work. We
> have that capability now (though it's slow) with Middlegen and so
> wouldn't lightly give it up. However, I do prefer Modeler for making
> those customisations and for generating the class source files.
>
> Cheers,
> Tony
>
> -----Original Message-----
> From: Robert Zeigler [mailto:robert.zeigle..oxanemy.com]
> Sent: Friday, 10 April 2009 7:40 a.m.
> To: use..ayenne.apache.org
> Subject: Re: Reengineering Overwrites
>
> Check out the "direction" column of the "Select Operations" table. It
> will allow you to choose the direction of the change, and thereby
> alter the operation performed (if there's a relationship in the
> modeler but not in the db, then to db direction will add a
> relationship to your db, and changing that to to model will change teh
> add relationship to drop relationship).
>
> Robert
>
> On Apr 9, 2009, at 4/92:31 PM , Weddle, Anthony wrote:
>
>> Thanks for the tip, John and Robert. However, I'm not sure that
>> reverse
>> capability is there in 3.0M5. If I select Migrate DB, I only get
>> operations in the direction of the database to select. For example, I
>> altered a table in the map and also added a table on the database;
>> the
>> two operations that Migrate gave me to select were to add the map
>> change
>> to the database and the drop the table I just created. There were no
>> operations that provided the DB to map direction.
>>
>> Maybe this functionality is not there in M5?
>>
>> If there was an option to migrate either way, I'm not sure it would
>> help, since I'd want to merge changes. I'd want to keep any changes
>> to
>> ObjEntities that I make in Modeler and merge in any database changes
>> (such as new tables, new columns, altered column definitions, deleted
>> columns) to the map.
>>
>> Unfortunately, these kinds of operations are not uncommon here and so
>> this would likely be a major issue for us. However, being a newbie at
>> Cayenne, I may not fully understand the capabilities.
>>
>> Tony
>>
>> -----Original Message-----
>> From: siberia..iberian.org [mailto:siberian@siberian.org] On Behalf
>> Of
>> John Armstrong
>> Sent: Thursday, 9 April 2009 5:56 p.m.
>> To: use..ayenne.apache.org
>> Subject: Re: Reengineering Overwrites
>>
>> Under to Tools menu in the modeler you can select the 'Migrate
>> Database Schema' command.
>>
>> This will diff the db against your current current map. You can then,
>> per change, decide if you want to take the DB version, the Cayenne
>> version or ignore.
>>
>> Its the best feature ever, I use it daily.
>>
>> This may not be what your looking for..
>> John-
>>
>>
>>
>>
>> NOTICE - This message and any attached files may contain information
>> that is confidential, legally privileged or proprietary. It is
>> intended only for use by the intended recipient. If you are not the
>> intended recipient or the person responsible for delivering the
>> message to the intended recipient, be advised that you have received
>> this message in error. Any dissemination, copying, use or re-
>> transmission of this message or attachment, or the disclosure of any
>> information therein, is strictly forbidden. BlueScope Steel Limited
>> does not represent or guarantee that this message or attachment is
>> free of errors, virus or interference.
>>
>> If you have received this message in error please notify the sender
>> immediately and delete the message. Any views expressed in this
>> email are not necessarily the views of BlueScope Steel Limited.
>
>
>
>
>
> NOTICE - This message and any attached files may contain information
> that is confidential, legally privileged or proprietary. It is
> intended only for use by the intended recipient. If you are not the
> intended recipient or the person responsible for delivering the
> message to the intended recipient, be advised that you have received
> this message in error. Any dissemination, copying, use or re-
> transmission of this message or attachment, or the disclosure of any
> information therein, is strictly forbidden. BlueScope Steel Limited
> does not represent or guarantee that this message or attachment is
> free of errors, virus or interference.
>
> If you have received this message in error please notify the sender
> immediately and delete the message. Any views expressed in this
> email are not necessarily the views of BlueScope Steel Limited.
This archive was generated by hypermail 2.0.0 : Thu Apr 09 2009 - 16:21:41 EDT