So my POI is when you have an @Entity
with a collection. Let's say you fetch the entity with a collection of items. Now let's assume the collection has entries.
My question is: what happens if you replace the collection that has:
Item(id: 1, name: "box"), Item(id:2, name: "plate")
with a collection that has:
Item(id:2, name: "puppy")
So: Item with id == 1 goes away if delete orphans is true and cascade is enabled. But when item with id == 2 is replaced, does it get updated to have label "puppy" instead of "plate" ?
What are the gotchas in spring boot when using @Transactional
?