Created
July 1, 2014 08:50
-
-
Save masazdream/944d59cc14d31cdb75ca to your computer and use it in GitHub Desktop.
Doma Appconfig
This file contains hidden or 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
| public class Main { | |
| public static void main(String[] args){ | |
| LocalTransaction tx = AppConfig.getLocalTransaction(); | |
| try{ | |
| tx.begin(); | |
| BetaDomaTableDao dao = new BetaDomaTableDaoImpl(); | |
| BetaDoma betaDomaTable = dao.selectById(2); | |
| betaDomaTable.message = "renew message 更新したよ!"; | |
| betaDomaTable.number = 10000; | |
| dao.update(betaDomaTable); | |
| tx.commit(); | |
| }finally{ | |
| // トランザクション | |
| tx.rollback(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment