2 ms·
Pretty sure I would have used a list, but making the Java interface ordered surely doesn’t change the semantics of the underlying relation?!
by doctor_eval 6y ago
Pretty sure I would have used a list, but making the Java interface ordered surely doesn’t change the semantics of the underlying relation?!
- tablespoon 6y ago> Pretty sure I would have used a list, but making the Java interface ordered surely doesn’t change the semantics of the underlying relation?! Yeah, it seems a little bonkers on first glance and I haven't ever dug in to see if there was a justifiable reason or not. IIRC, if you just need ordering, you could just use an SortedSet. I think technically lists are for when you need ordering and duplicates.
- doctor_eval 6y agoYeah it is bonkers! Not just at first glance. The fact that the SQL integration for the child object behaves differently based on the kind of collection used in the parent is exactly the kind of unintuitive behaviour that drove me nuts. There are so many rules to remember for something that is supposed to make SQL integration natural.