Posts by Henrique Landim • 1 point
2 posts
-
0
votes1
answer47
viewsA: Insert record into a table and use newly generated ID to insert record into related table
Empresa emp = new Empresa(); Empresa empSalva = new Empresa(); emp.setId(1); emp.setNome("Nome da empresa"); empSalva = repository1.saveAndFlush(emp); RelacaoEmp…
-
0
votes1
answer47
viewsQ: Insert record into a table and use newly generated ID to insert record into related table
I have a insert where I save a record, and need to use the result of the saved value in another insert. Empresa emp = new Empresa(); emp.setId(1); emp.setNome("Nome da empresa");…