Hi i want to achieve following
insert into t1 (c1,c2) values (v1,v2)
above transaction will create a unique identifier for the row created. lets say UIDT1
now i want to execute multiple inserts in another table like
insert into t2 (c1,c2,c3) values (UIDT1,v2,v3)
insert into t2 (c1,c2,c3) values (UIDT1,v2,v3)
insert into t2 (c1,c2,c3) values (UIDT1,v2,v3)
.
.
.
using Java, i can write all queries in a text file and read one by one and create all transactions but i wanted to know if there is any more efficient way of doing the same. Need your inputs..
Note : I am using Spring JDBC
Purpose : Unit testing, creating User(t1) and UserDetails(t2) considering tests run with a fresh DB i am creating users and user details first and then using that user i will test other scenarios.