X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=security%2Fimpl%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fusermgt%2Fjpa%2FJpaGroupSet.java;h=a9d579e2b89a76561a319058cb9f168e780124bd;hb=74a6cd5b71b4f668ddac54c3237511ee11e8d84e;hp=b9db23975f748f71e3124eb7a45b5d4c8a18bd7b;hpb=892308472780286f05a3f373cbc11f6f2a32a811;p=utils diff --git a/security/impl/src/main/java/org/wamblee/usermgt/jpa/JpaGroupSet.java b/security/impl/src/main/java/org/wamblee/usermgt/jpa/JpaGroupSet.java index b9db2397..a9d579e2 100644 --- a/security/impl/src/main/java/org/wamblee/usermgt/jpa/JpaGroupSet.java +++ b/security/impl/src/main/java/org/wamblee/usermgt/jpa/JpaGroupSet.java @@ -1,3 +1,18 @@ +/* + * Copyright 2005-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.wamblee.usermgt.jpa; import java.util.List; @@ -11,6 +26,11 @@ import org.wamblee.persistence.JpaMergeSupport; import org.wamblee.usermgt.Group; import org.wamblee.usermgt.GroupSet; +/** + * Group set backed by the database. + * + * @author Erik Brakkee + */ public class JpaGroupSet implements GroupSet { private EntityManager em; @@ -26,6 +46,7 @@ public class JpaGroupSet implements GroupSet { return false; } em.persist(aGroup); + em.flush(); // to make sure the version is updated. return true; }