You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2020/11/18 16:30:47 UTC
[openmeetings] branch master updated: [OPENMEETINGS-2441]
invitation saving should be more stable
This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push:
new b80d897 [OPENMEETINGS-2441] invitation saving should be more stable
b80d897 is described below
commit b80d897bd8865a9a833a4765d6488e19dadd747b
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Wed Nov 18 23:21:29 2020 +0700
[OPENMEETINGS-2441] invitation saving should be more stable
---
.../main/java/org/apache/openmeetings/db/dao/room/InvitationDao.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/InvitationDao.java b/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/InvitationDao.java
index df76dcc..77a4a95 100644
--- a/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/InvitationDao.java
+++ b/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/room/InvitationDao.java
@@ -41,6 +41,7 @@ import javax.persistence.PersistenceContext;
import org.apache.openmeetings.db.dao.IDataProviderDao;
import org.apache.openmeetings.db.entity.room.Invitation;
import org.apache.openmeetings.db.entity.room.Invitation.Valid;
+import org.apache.openmeetings.db.entity.user.User;
import org.apache.openmeetings.util.CalendarHelper;
import org.apache.wicket.util.string.Strings;
import org.slf4j.Logger;
@@ -118,6 +119,8 @@ public class InvitationDao implements IDataProviderDao<Invitation> {
}
public Invitation update(Invitation invitation) {
+ // [OPENMEETINGS-2441] in life cycle state unmanaged while cascading persistence via field
+ invitation.setInvitedBy(em.find(User.class, invitation.getInvitedBy().getId()));
if (invitation.getId() == null) {
invitation.setInserted(new Date());
em.persist(invitation);