Use Rowversion attribute of external database
Application Type
Service
Service Studio Version
11.10.12 (Build 39237)
Platform Version
11.10.2 (Build 25738)

Hello everyone,

I was wondering if you people have a solution for the following use case:

Our client has an external database and wants to synchronize certain data to an entity in OutSystems. Only changed records should be updated in the OutSystems entity. The external database has a Rowversion attribute to determine if a record has changed. 

We did some research and this the OutSystems documentation says that the external database type Rowversion does not have an OutSystems datatype and the attribute will be marked as ignored: https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Extensibility_and_Integration/Mapping_External_DB_Data_Types_to_OutSystems_Data_Types

We tried to map the Rowversion to the text datatype in Integration Studio, but that resulted only in values "System.Byte[]". When we map it to binarydata it says "BinaryData (8 bytes)" in the aggregate, but when we convert it in an action to text (with BinaryDataToText) the value is empty.

I can imagine more more projects have a use case for the Rowversion type, so I wonder how we can solve this?

Best regards

Funs

Hello João,

I can not follow the link (in this thread) can you please repost it?

I found for this kind of cases I can set the type to BinaryData, If I save this or do an orderby on the RV this works fine
So where {testTable}.[RowVersion] > @LastRV will give the changed rows since the saved LastRV binary.

But i'm curious about the thread where you are talking about.

(i'm a colleague of Funs and working on this case together)

Still we will give this idea to to OutSystems. It would be nice if they map it to an Long Integer (i already created an extension to convert the binary to an long int)

Kind regards,

Robert.

mvp_badge
MVP

Hi Robert,


Thanks for pointing it out. Something must have gone wrong in the copy + paste.
The thread I was taking about is this one.

It's nice you found a workaround for it but if the platform would be able to do the mapping.


Kind Regards,
João

mvp_badge
MVP
Solution

Hi Funs,


Having search a bit about this issue, you are right that rowversion is not mapped.

One workaround would be to convert the timestamp column datatype to a datatype that can be mapped in OutSystems in the external SQL Database itself. This workaround is also what is suggested in this thread with a similar topic.


In any case, you can always create an idea for OutSystems to make this mapping available in the Ideas section, I couldn't find a similar idea there. In this way, OutSystems team can have an eye on it and might eventually include this feature in future platform release.


Kind Regards,
João

Hello João,

I can not follow the link (in this thread) can you please repost it?

I found for this kind of cases I can set the type to BinaryData, If I save this or do an orderby on the RV this works fine
So where {testTable}.[RowVersion] > @LastRV will give the changed rows since the saved LastRV binary.

But i'm curious about the thread where you are talking about.

(i'm a colleague of Funs and working on this case together)

Still we will give this idea to to OutSystems. It would be nice if they map it to an Long Integer (i already created an extension to convert the binary to an long int)

Kind regards,

Robert.

mvp_badge
MVP

Hi Robert,


Thanks for pointing it out. Something must have gone wrong in the copy + paste.
The thread I was taking about is this one.

It's nice you found a workaround for it but if the platform would be able to do the mapping.


Kind Regards,
João

Hi João and Robert,

Thanks for the suggestions. I will create an Idea to support Rowversion for the integration with an external database.

The suggestion of Robert works and I will use it as workaround for now.


Kind regards,

Funs   

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.