I am using Hibernation and for some time implementing the Cascading Delay operation of your children from the original object I used the following two options
One option should be found on the parent object (child), add the children to the returned collection and allow hibernate to cascade automatically DELETE. The disadvantage of this option is that the getChildren () collection needs to be highlighted, although it is used only to support hibernate cascading.
Another option is to see parents in their parents' parents. The disadvantage of this option is more custom code. However, this option can perform better if it uses a batch delivery statement.
Which approach do you mostly use? Do you see other professionals and opposition?
Which approach do you mostly use? Do you see other professionals and opposition?
When I make real composition relationship (and a relatively low number of records) however, I only apply a deletion Does not offer such a connection, but use a query (Bulk HQL Deletes or native SQL queries). For my experience, profit is more than "cost" of additional code (which is way too small).
Comments
Post a Comment