Hi
I am trying to get instance name of an entity like:
@Transient
@Autowired
MetadataTools metadataTools;
@DependsOnProperties(value = {"product", "currentDiscount"})
@JmixProperty
@Transient
public String getDiscountedProd() {
if (discount != null && currentDiscount != null)
return metadataTools.getInstanceName(product) + " (" + currentDiscount + ")";
return null;
}
But metadataTools is null. Same is the case with EntityStates which I need in another entity class. Can’t I use these components in Jmix Entity class? Please suggest or I would have to define un-necessary InstanceName methods and call them.