java - Should I map cascade operations in hibernate when it's fully mapped in SGBD? -


i've defined foreign keys , cascade operations in mysql, should map in hibernate objects or leave mysql it's things alone?

if going define them within db defining them on hibernate objects generate delete statements aren't necessary.

personally think having cascading deletes within db can difficult work db has more of intelligence of application. prefer define these types of business rules within code rather in db because keeps of persistence information in 1 place. think it's similar argument why many people dislike db triggers.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -