Given an entity B which has a String and a Date value.
An instance of B is created once per workload and is shared by all other entities created in a per work load.
B bee = new B();
We have another entity class A which we create only once per workload, and have:
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
List<B> bees = new B();
We then add a.bees.add(bee);
once for entity a and once for other entity types, c - z.
Now, since this bee is shared, what happens when I delete an entity of type A that has this b ?
Will hibernate attempt to delete B despite it being potentially referenced by other entities other than A?
Is there a way to ORPHANDELETE / CASCADE DELETE only when the b is no longer referenced ANYWHERE?