Cross join on single table in jpa and hiberante

Viewed 15

I have a table called People and it looks like this

ID Gender Age
1 Female 1-24
2 Male 30-34

The resulting table should be

ID Gender Age
1 Female 1-24
2 Male 30-34
3 Female 30-34
4 Male 1-24

if there are further addition to the Gender and age column then all the combinations needs to be inserted in database.

Can someone please help me with this

0 Answers
Related