diff --git a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java index 9fb504b9..d7263af3 100644 --- a/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/invoicing/InvoicingServiceImpl.java @@ -64,5 +64,13 @@ public class InvoicingServiceImpl extends AbstractOwnedService implem Query q = dao.getQuery("select inv from Invoicing as inv join fetch inv.requirement rq join fetch rq.ownedBy order by rq.numser"); return q.list(); } + + @Transactional + @LazyLoader("form") + public void loadOwnedBy(Invoicing invoice) { + Invoicing inv = getById(invoice.getId()); + Hibernate.initialize(inv.getRequirement().getOwnedBy()); + invoice.getRequirement().setOwnedBy(inv.getRequirement().getOwnedBy()); + } }