I have 2 tables with 1:(0 or 1) relations for example:
table1 - students
id | last_name | first_name |
---|---|---|
1 | Hart | John |
table2 - student_address
id | student_id | address | is_married |
---|---|---|---|
1 | 1 | something | true |
not every student has an address (for the example)
I want to update both tables, update students and if exist relative row in student_address - update also the student_address. is it possible to do it in one query in JOOQ?