Created
March 11, 2015 23:09
-
-
Save alejandro-loza/7b1b7b4ef920fde645dd to your computer and use it in GitHub Desktop.
cascade delete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void rollback(List<ItemGroupProfile> itemGroupProfiles){ | |
itemGroupProfiles.each { itemGroupProfile -> | |
SkuProfile.executeUpdate( | |
'delete from SkuProfile where itemGroupProfile=:itemGroupProfile', | |
[itemGroupProfile: itemGroupProfile]) | |
itemGroupProfile.delete(flush: true, failOnError: true) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment