Created
May 14, 2009 10:12
-
-
Save shin1ogawa/111603 to your computer and use it in GitHub Desktop.
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
Transaction transaction = pm.currentTransaction(); | |
try { | |
transaction.begin(); | |
Parent2 target = (Parent2) pm.getObjectById(Parent2.class, | |
parent.getKey()); | |
pm.deletePersistent(target); | |
transaction.commit(); | |
} finally { | |
if (transaction.isActive()) { | |
transaction.rollback(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment