Sparx Systems Forum

Enterprise Architect => Suggestions and Requests => Topic started by: OpenIT Solutions on August 26, 2011, 06:27:21 pm

Title: Merging Elements
Post by: OpenIT Solutions on August 26, 2011, 06:27:21 pm
Hi,

Coud i request a feature - the ability to merge two or more elements into a single element. I provide governance around models and often find on global projects that individuals wil create duplicate elements in different parts of a model - say the same Component under different packages - EA lacks a feature to merge these into a single component. It would be nice if regular expersions could be used to find/match elements for merging and if one of the elements could be picked as the target.

Thanks,

Jon.
Title: Re: Merging Elements
Post by: qwerty on August 26, 2011, 09:05:27 pm
Though I think this would be a good feature I doubt we can get it. What can be done is the following:

If you look onto that process you will easily find out that an automated support is merely impossible.

q.
Title: Re: Merging Elements
Post by: OpenIT Solutions on August 30, 2011, 08:53:41 pm
Um. I'd still like to request it as a new feature. It seems to me that something like the following sql should work...(in this example to merge object_id 164 into 156)

begin
delete from t_object where object_id = 164;
update t_diagramobjects set object_id = 156 where object_id = 164;
update t_attribute set object_id = 156 where object_id = 164;
update t_attributeconstraints set object_id = 156 where object_id =164;
update t_method set object_id = 156 where object_id = 164;
update t_objectconstraint set object_id = 156 where object_id = 164;
update t_objecteffort set object_id = 156 where object_id = 164;
update t_objectfiles set object_id = 156 where object_id = 164;
update t_objectmetrics set object_id = 156 where object_id = 164;
update t_objectproblems set object_id = 156 where object_id = 164;
update t_objectproperties set object_id = 156 where object_id = 164;
update t_objectrequires set object_id = 156 where object_id = 164;
update t_objectresource set object_id = 156 where object_id = 164;
update t_objectrisks set object_id = 156 where object_id = 164;
update t_objectscenarios set object_id = 156 where object_id = 164;
update t_objecttests set object_id = 156 where object_id = 164;
update t_objecttrx set object_id = 156 where object_id = 164;
update t_operation set object_id = 156 where object_id = 164;

update t_connector set start_object_id = 156 where start_object_id = 164;
update t_connector set end_object_id = 156 where end_object_id = 164;
commit;
Title: Re: Merging Elements
Post by: Eve on August 31, 2011, 08:36:54 am
Missing... Classifiers for objects (also by guid), attributes, operations, parameters.
Parent ids for both diagrams and objects.
Tagged value references (by guid), xref references (by guid)

That's really just a start, there are also special cases such as association classes etc.
Title: Re: Merging Elements
Post by: skiwi on August 31, 2011, 01:18:32 pm
I'd vote for this,
it would be a 'killer' feature for model maintenance
Title: Re: Merging Elements
Post by: OpenIT Solutions on August 31, 2011, 07:34:45 pm
Hi Simon,

Thanks for the input. yep your right of course. i derived the sql by scanning the ddl used to create the ea model for occurances of object_id - appreciate that without your inpt i'd probably end up doing more harm than good...hence the request for this to be added as a feature - for those of us managing large models/teams it would be gold dust!

Thanks again,

Jon.
Title: Re: Merging Elements
Post by: qwerty on September 01, 2011, 06:55:01 am
Quote
I'd vote for this,
it would be a 'killer' feature for model maintenance
If you mean it would kill your model I' be with you. Just think about what Simon said.

q.