{"action":"closed","issue":{"url":"https://api.github.com/repos/davidsowerby/krail-jpa/issues/8","labels_url":"https://api.github.com/repos/davidsowerby/krail-jpa/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/davidsowerby/krail-jpa/issues/8/comments","events_url":"https://api.github.com/repos/davidsowerby/krail-jpa/issues/8/events","html_url":"https://github.com/davidsowerby/krail-jpa/issues/8","id":89948608,"number":8,"title":"StatementDao not committing correctly","user":{"login":"davidsowerby","id":2175702,"avatar_url":"https://avatars.githubusercontent.com/u/2175702?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsowerby","html_url":"https://github.com/davidsowerby","followers_url":"https://api.github.com/users/davidsowerby/followers","following_url":"https://api.github.com/users/davidsowerby/following{/other_user}","gists_url":"https://api.github.com/users/davidsowerby/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsowerby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsowerby/subscriptions","organizations_url":"https://api.github.com/users/davidsowerby/orgs","repos_url":"https://api.github.com/users/davidsowerby/repos","events_url":"https://api.github.com/users/davidsowerby/events{/privacy}","received_events_url":"https://api.github.com/users/davidsowerby/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/davidsowerby/krail-jpa/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/davidsowerby/krail-jpa/labels/wontfix","name":"wontfix","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-21T19:13:42Z","updated_at":"2015-07-11T14:53:11Z","closed_at":"2015-07-11T14:53:11Z","body":"Tutorial 09 - ```StatementDao``` adds entities as required, but they do not commit until one of the other methods (```EntityManager``` or ```BlockDao```) is used.\r\n\r\nTried modifying the code as below, but that didn't work either\r\n\r\n```\r\n  /**\r\n     * @see Dao#save(Object, KrailEntity)\r\n     */\r\n    @Nonnull\r\n    @Override\r\n    @Transactional\r\n    public <E extends KrailEntity<ID, VER>> E save(@Nonnull E entity) {\r\n        final EntityManager entityManager = entityManagerProvider.get();\r\n        E result = baseDao.save(entityManager, entity);\r\n        entityManager.flush();\r\n        return result;\r\n    }\r\n```"}}