Funny things in system tables of OutSystems

Funny things in system tables of OutSystems

  

Hi,

I am using the system tables to create queries that are not dependant on the environment (because table names can change based on different environments). During testing I found out something is funny with the attribute table. For some columns multiple records of the same attribute for one entity are present, sometimes a lot of times (like 40 for some)
I used this query :

select entity_id, [name], count(*)
from   dbo.ossys_Entity_Attr
where is_active = 1
group by entity_id, [name]
having count(*) > 1

I filter on the active bit and still the multiples are there.

Is this correct behavior ?

regards,
Wim
Hi Wim,

why do you need to use physycal entities names instead of logical names? if you use logical you will never have the problem with environments, even in advaced queries.

Maybe i'm missing something...

cheers,
RNA

Hi Ricardo,

It's easier to get a report out using SQL from a table we have problems with on the production environment. Because I don't have access to that environment I want to make a sql that will generate sql that can generate the report. Its a one time action so no need to generate a program for this (altough now that looks more easy) Ok, maybe a little bit difficult approach :-).

But the thing is not that i'm doing this, the problem is that the attribute system table contains double records .. and that I don't like..

Regards,
Wim
It has more than one year the last post but (depending on platform version you are using) it might help you.

http://www.outsystems.com/NetworkForums/ViewTopic.aspx?Topic=Entity-to-physical-table-mapping

RNA
We already use sql map and it's very good, I can also fix my script by using distinct and it works, but still it isn't nice a system table contains double records..

Regards,
Wim
Hi Wim.

Indeed, there were times in the past where that table would contain duplicate records. However, that situation has been fixed - even though, for the sake of data safety, the duplicates were not removed from the database - and you can be assured that that situation has no impact whatsoever in runtime. We do recognize, though, that it can be a problem if you're using such data for reporting purposes.

What I do recommend is that you get in touch with our support (support@outsystems.com), because they'll be the ones better equipped to sort that situation out in your production environment.

Hope this helps!

Regards,

Paulo Tavares