Database View - One to Many relationship

k_yamamoto
Tera Expert

Hi,

I'm trying to create a database view that has a one-to-many relationship.

I have to implement this requirement because of a plugin's limitation that I will use.

 

These are tables I would like to join.

・Table A(Referenced by Table B, has multiple records of TableB)

 

・Table B (References Table A)
 Column b1(Reference field to Table A)

I would like to show these tables as below picture. (One Table A record has multiple Table B records as a related list.)

k_yamamoto_0-1679970545240.png

 

I created a database view as below.

Table A : Prefix a

Table B : Prefix b

Where clause : b_u_column_b1=a_sys_id

k_yamamoto_2-1679971555428.png

 

But it didn't work as I expected. It seems that the database view has one-to-one relationship.

k_yamamoto_1-1679971514703.png

Does anyone know how to create a database view that has one-to-many relationship?

Thanks.

6 REPLIES 6

Jaspal Singh
Mega Patron
Mega Patron

Hi,

Unusre, of the expectation. However, you can set Left Join True for one-to-many relationship.

You can add it is as a field on the view tables form/list

Hi, @Jaspal Singh 
Thank you for your reply.

I set Left Join to True, but it didn't work.