I'm working with the Play framework and I'm trying to access properties (defined as public fields and enhanced by the Play framework) of an Ebean entity from my scala code.
From the play documentation I have learned that
(2) Enhancement of direct Ebean field access (enabling lazy loading) is only applied to Java classes, not to Scala. Thus, direct field access from Scala source files (including standard Play templates) does not invoke lazy loading, often resulting in empty (unpopulated) entity fields. To ensure the fields get populated, either (a) manually create getter/setters and call them instead, or (b) ensure the entity is fully populated before accessing the fields.
So how would I go about doing (b)? I could probably access the properties from my Java before calling into scala but is there a better/simpler way?