Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Done
-
2.0.0
-
None
Description
InvoiceSummary is an entity
Its collection of getInvoices is a repository query:
@Collection
public List<InvoiceForLease> getInvoices()
Its collection "invoicesDocsFra" is derived, returning view model for each entity.
public class InvoiceSummary_invoiceDocsFra {
private final InvoiceSummary invoiceSummary;
public List<DocAndCommFra> coll()
{ return invoiceSummary.streamInvoices() .map(docAndCommFactory::instantiate) .collect(Collectors.toList()); }}
the DocAndCommFra is a view model that wraps each invoice:
@Named(DocAndCommFra.LOGICAL_TYPE_NAMED)
@DomainObject(nature = Nature.VIEW_MODEL)
@DomainObjectLayout
@NoArgsConstructor
@AllArgsConstructor(access = AccessLevel.PACKAGE)
public final class DocAndCommFra {
public static final String LOGICAL_TYPE_NAMED = "outgoing.invoiceforlease.DocAndCommFra";
@Property
@PropertyLayout(sequence = "1")
@Getter @Setter
private InvoiceForLease invoice;
@Property
@PropertyLayout(sequence = "1.3")
public Lease getLease()
@Property()
@PropertyLayout(sequence = "1.4")
public CommunicationChannel getSendTo()
...
}
it's possible to sort the "docAndCommsFra" table on invoice, and on lease, but not on sendTo. Note that CommunicationChannel is abstract, subtypes are either EmailAddress or PostalAddress.
Attachments
Attachments
Issue Links
- supercedes
-
CAUSEWAY-3641 [Wicket Viewer] Cannot simply use Action Mementos to recreate Table Data
- Closed
- links to