one to one relationship with user table and a table stored in our external database

I have my external database and i want to add some information like profile image for Login user so i need to make one to one relationship with the user(system)  table and the table stored in my external database. can anybody suggest idea for the same

Hi Jitendra,

you can store the other information in external database on the basis of username.



mvp_badge
MVP

Hi @Jitendra Kumar ,

You can take UserName (Text) Or UserId (LongInt)  attribute  in your external DB entity and make this column as UniqueKey.

So no duplicate ID or Username can inserted in this attributes.


Hope this will help you

I am facing One issue in this solution, When i am going to traverse the data of particular user from ecom_User table is always picking 1st  Data image in details for any record not the image associated with that user  

Hi! If you don't have control over the external database , you may need to build a entity in you OutSystems application that is an extension of the system entity User and have there an attribute that is the key in the external DB of the image, or other info you need.

Hope this will help you

Hello @Maria da Graça Peixoto  I have access to external database and I have a created a entity for extension Ecom_Users(external database) to map images With the users present in User(system)  table in one to one manner ,but the problem is that i have to upload image for every user and i cant update user table(system) so i need to make an one to one extension with user table table and ecom_user table  i am unable to make one one relationship. 

Hi Jitendra,

Any relationship in relational database is possible only with in the database. As suggested by Maria you can create a user extended table in outsystems DB itself or if you need only to store data in external database than you can store by username.

Hi Jitendra, 

Why do you need to "update user table(system) "? 

Do you have a column with the UserName, or the UserId (from OutSystems), in the Ecom_Users(external database) ?   

Have you defined the new entity Ecom_Users(external database)  in the extension module so it can be seen inside OutSystems Platform? 

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