Hi Nikita,
That looks great and pretty much exactly what I was hoping for. Thanks!
F
>
> On May 6, 2020, at 2:46 AM, Nikita Timofeev wrote:
>
> Hi Faizel,
>
> Accessing metadata from cgen is a long-standing task [1]. And I
> finally made an approach to it and unshelved some code I've been
>
Hi Faizel,
Accessing metadata from cgen is a long-standing task [1]. And I
finally made an approach to it and unshelved some code I've been
working on [2]. It does exactly as you think it should, exporting
"metadataUtils" to the Velocity context, see [3] as an example.
[1] https://issues.apache.o
Accessing metadata from my Cayenne app is not an issue at the moment—I am doing
the same thing you suggest and providing the default metadata class. That works
well, and I’m able to store/retrieve metadata other than comments. However, it
appears that metadata, specifically DataChannelMetaData,
For accessing the metadata, I looked into this a bit. At runtime in an app
this information isn't accessible by default, so if you wanted to use it at
runtime you would have to configure the runtime to access it with a DI
module like this:
*public* *class* MyModule *implements* Module {
*public*
No worries. I never did find a way to pass properties to the cgen goal in the
plugin, so I ended up experimenting with the plugin source and modified it to
allow specifying system properties from the pom.xml file (in the goal’s
configuration section).
Once the plugin was able to set system pro
Unfortunately I'm not a maven user, so I can't really help here. But
hopefully someone else could chime in.
On Sun, May 3, 2020 at 11:39 AM Faizel Dakri wrote:
> Hi John,
>
> Thank you for the pointers. I didn’t see any way to easily get the
> metadata into my templates via a custom tool, howeve
Hi John,
Thank you for the pointers. I didn’t see any way to easily get the metadata
into my templates via a custom tool, however I thought it would be a good
exercise to figure out how to do it anyway. I’ve tried to follow your advice
(as well as looking at the cayenne source), but I’m havin
I haven't used the metadata / comments yet, so I can't help with that
specifically.
For the using a custom tool with cgen you need to define a
"tools.properties" file in your class path (I would just put it at the
root) with contents like this:
tools.toolbox = application
tools.application.*myU
Hello all,
Being fairly new to Cayenne, this may be an obvious question. I would like to
know how I can access the metadata stored on an attribute/relationship/entity
in the datamap from within my velocity templates (I think in CayenneModeler,
this is how the comment field is stored for a data