You can have OneToMany relation between 2 tables, but You can also have this relation in just one table. So, in this case, List of some property (column) will be repeated.
Let say, we have Entity with column ID_FIRST_TABLE and list of values ID_SECOND_TABLE for that ID_FIRST_TABLE. As object it will be object1.listObjects2, and if it can be configured with just one table, it will be simple objectRepository.save(object1) and it will store
GENERATED ID | ID_FIRST_TABLE | ID_SECOND_TABLE | NAME
1 1 1 Name1
2 1 2 Name2
3 2 3 Name3
4 2 2 Name2
In this ONE TABLE is object (FIRST_TABLE) which has property as list of other objects (SECOND_TABLE).
Aobject1(FIRST_TABLE)
.id=1
.List<SECOND_TABLE> -> Bobject1(SECOND_TABLE)
.id=1
.name=Name1
-> Bobject2(SECOND_TABLE)
.id=2
.name=Name2
Aobject2(FIRST_TABLE)
.id=2
.List<SECOND_TABLE> -> Bobject3(SECOND_TABLE)
.id=3
.name=Name3
-> Bobject2(SECOND_TABLE)
.id=2
.name=Name2
So, I want to have just one table where when I save Aobject1 will save 2 records in that table (GENERATED ID 1 and 2). When I save Aobject2, it will save also 2 records in that table (GENERATED ID 3 and 4).