Very new to Cuba, apologies if this is a simple issue.
I have a very simple invoice / invoice line composition that worked fine until I added the following transient linePrice property.
@Column(name = "QUANTITY", nullable = false)
protected Integer quantity;
@Column(name = "UNIT_PRICE", nullable = false)
protected BigDecimal unitPrice;
@Transient
@MetaProperty(related = {"quantity", "unitPrice"})
protected BigDecimal linePrice;
public BigDecimal getLinePrice() {
return getUnitPrice().multiply(BigDecimal.valueOf(getQuantity()));
}
I added linePrice to my view but whenever I try to edit I get a NullPointerException pointing to the “return” line in getLinePrice.
Any pointers appreciated.