Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Viliam Durina

Pages: [1]
1
General Board / Re: Duplicate Tagged Values
« on: May 15, 2008, 05:10:10 pm »
If you use database repository you can repair duplicated tagged values with the following script. The script relies on the fact, that a duplicate tagged value always has higher propertyid than the original one. It simply moves the value to the newer one and deletes the older one, keeping only the profiled tagged value in place. Before running the script synchronize tagged values for all of your stereotypes to produce duplicates.

The script was written for Oracle database.

Code: [Select]
-- ATTRIBUTES #######
update T_ATTRIBUTETAG at
set value=(
  select value
  from T_ATTRIBUTETAG at2
  where at2.elementid=at.elementid and at2.property=at.property
  and at2.propertyid=(
    select min(at3.propertyid)
    from T_ATTRIBUTETAG at3
    where at3.elementid=at2.elementid and at2.property=at3.property
  )
)
where
  at.propertyid=(
    select max(propertyid)
    from T_ATTRIBUTETAG at4
    where at4.elementid=at.elementid and at4.property=at.property
    having count(*)>1
  );
  
delete
from t_attributetag ta
where ta.propertyid=(
  select min(ta2.propertyid)
  from t_attributetag ta2
  where ta2.elementid=ta.elementid and ta2.property=ta.property
  having count(*)>1
);


-- METHODS #######
update T_OPERATIONTAG at
set value=(
  select value
  from T_OPERATIONTAG at2
  where at2.elementid=at.elementid and at2.property=at.property
  and at2.propertyid=(
    select min(at3.propertyid)
    from T_OPERATIONTAG at3
    where at3.elementid=at2.elementid and at2.property=at3.property
  )
)
where
  at.propertyid=(
    select max(propertyid)
    from T_OPERATIONTAG at4
    where at4.elementid=at.elementid and at4.property=at.property
    having count(*)>1
  );
  
delete
from T_OPERATIONTAG ta
where ta.propertyid=(
  select min(ta2.propertyid)
  from T_OPERATIONTAG ta2
  where ta2.elementid=ta.elementid and ta2.property=ta.property
  having count(*)>1
);


-- CONNECTORS #######
update T_CONNECTORTAG at
set value=(
  select value
  from T_CONNECTORTAG at2
  where at2.elementid=at.elementid and at2.property=at.property
  and at2.propertyid=(
    select min(at3.propertyid)
    from T_CONNECTORTAG at3
    where at3.elementid=at2.elementid and at2.property=at3.property
  )
)
where
  at.propertyid=(
    select max(propertyid)
    from T_CONNECTORTAG at4
    where at4.elementid=at.elementid and at4.property=at.property
    having count(*)>1
  );
  
delete
from T_CONNECTORTAG ta
where ta.propertyid=(
  select min(ta2.propertyid)
  from T_CONNECTORTAG ta2
  where ta2.elementid=ta.elementid and ta2.property=ta.property
  having count(*)>1
);


-- CLASSES #######
update T_OBJECTPROPERTIES at
set value=(
  select value
  from T_OBJECTPROPERTIES at2
  where at2.object_id=at.object_id and at2.property=at.property
  and at2.propertyid=(
    select min(at3.propertyid)
    from T_OBJECTPROPERTIES at3
    where at3.object_id=at2.object_id and at2.property=at3.property
  )
)
where
  at.propertyid=(
    select max(propertyid)
    from T_OBJECTPROPERTIES at4
    where at4.object_id=at.object_id and at4.property=at.property
    having count(*)>1
  );
  
delete
from T_OBJECTPROPERTIES ta
where ta.propertyid=(
  select min(ta2.propertyid)
  from T_OBJECTPROPERTIES ta2
  where ta2.object_id=ta.object_id and ta2.property=ta.property
  having count(*)>1
);

commit;

Viliam Durina

2
Bugs and Issues / "Edit Parameters" for a method takes too long
« on: July 31, 2008, 07:35:00 pm »
I have a method with one parameter of class type and if I click the "Edit Parameters" button, the CPU goes to 100% and the window pops up after several seconds.

I tried to open the same model at the colleague's computer and he did not have this problem. I tried to upgrade to the latest version of EA (from 7.1.829 to 7.1.831), tried to uninstall and reinstall, and had no success.

The model is in repository in Oracle database. It happens only in this model, other models with very similar configuration cause no problem. I worked with that model one or two months ago without problem and now returned to it. In the meantime, I started to have problem with msxml4 updates, when the system forces me to update every day. I tried to fix this with some tutorials from the web, but it just keeps updating. I ignored it, as it seemed to cause no problem and I don't want to reinstall windows for such trifle. But it could be related to this problem.

Is there any way to see, which code causes this? Anyway, any response is appreciated.

Thanks,
Viliam [ch270]urina

3
Bugs and Issues / Re: Copy attribute and fully qualified tag value i
« on: July 09, 2008, 06:59:48 pm »
I have a solution (see http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1208942296/7#7 that I posted a while ago). This post is just a bug report for the future...
Viliam

4
Bugs and Issues / Re: Copy attribute and fully qualified tag value i
« on: July 09, 2008, 05:56:54 pm »
I just upgraded to build 831 and this problem still reproduces.

5
Bugs and Issues / Copy attribute and fully qualified tag value issue
« on: July 08, 2008, 05:13:29 pm »
If you copy an attribute with namespaced tagged value, the copied attribute does not contain the namespace. This later causes that after synchronizing tagged values from profile the tagged values are duplicated.

I use the 7.1.829 version.

Pages: [1]