Open spring-projects-issues opened 4 years ago
Jens Schauder commented
I agree in principle, but it shouldn't be represented by a List
but a separate datatype. Hibernate calls it a Bag
Veli-Pekka Muli commented
Doesn't Hibernate Bag map to List? Having some non-standard data type would add Spring Data JDBC as a dependency of my entities
Jens Schauder commented
Very good point
Jens Schauder commented
After some internal discussion we decided that Collection
would be a good way to mark a collection has not specifying an order but potentially having multiple identical entries
Veli-Pekka Muli opened DATAJDBC-630 and commented
Currently the only way to have collections that don't have an order column in the database is to make the collection a Set. This is limiting as Set does not allow duplicate elements and Spring Data JDBC shouldn't force the type of the collections that the entities can have like this. If I want to sort the collection in my code then it might be confusing for the reader because I was forced to use Set which usually isn't ordered.
@MappedCollection
should be optional for ListsNo further details from DATAJDBC-630