Commit e32a7a65 by Antti Tonkyra

Refactored VB

1 parent 3e97d598
...@@ -57,15 +57,16 @@ public class VotingBean implements VotingBeanLocal { ...@@ -57,15 +57,16 @@ public class VotingBean implements VotingBeanLocal {
compoEntry.setCreated(Calendar.getInstance()); compoEntry.setCreated(Calendar.getInstance());
compoEntry.setCreator(permissionBean.getCurrentUser()); compoEntry.setCreator(permissionBean.getCurrentUser());
compoEntryFacade.create(compoEntry); Compo c = compoFacade.merge(compoEntry.getCompo());
c.getCompoEntries().add(compoEntry);
compoFacade.flush();
compoEntryFile.setEntriesId(compoEntry); compoEntryFile.setEntriesId(compoEntry);
compoEntryFacade.flush();
compoEntryFileFacade.create(compoEntryFile);
compoEntry.setCurrentFile(compoEntryFile);
compoEntry.setFiles(new ArrayList<CompoEntryFile>());
compoEntry.getFiles().add(compoEntryFile); compoEntry.getFiles().add(compoEntryFile);
//compoEntry = compoEntryFacade.merge(compoEntry);
//compoEntryFile.setEntriesId(compoEntry);
//compoEntry.getFiles().add(compoEntryFile);
} }
public Compo getCompoById(Integer compoId) { public Compo getCompoById(Integer compoId) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!