Hi Sergey,
The best way to handle it is via AgEntityOverlay. It allows to register a property that does not belong to the entity, with an arbitrary calculation function. We are improving overlays significantly in 3.4 (e.g. we'll allow to set it per-request, there's a more powerful builder API for overlays, etc.). Still in the current 3.3 (and earlier) you can register an overlay in the runtime scope like this:
AgRuntime agRuntime = AgBuilder
.builder(cayenneRuntime)
.entityOverlay(new AgEntityOverlay(EntityA.class).addAttribute("c", Integer.class, ea -> ea.a * ea.b))
.build();
Hope this helps.
Andrus
> --
> You received this message because you are subscribed to the Google Groups "Agrest Framework User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
agrest-user...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/agrest-user/2946a507-b741-41db-8b69-1eddd333ec47%40googlegroups.com.