tags:

views:

21

answers:

1

More precisely, I want to know, how one can model annotations into the ecore model definition. So that the generated java code would contain them. (For eg: hibernate persistence tags)

A: 

I don't think you can to this out of the box. However, you could look into the parameters of the ".genmodel" file to see if you can tweak how annotations (EAnnotations) are being output to the files. The problem with code generation templates is that they are fixed, but maybe through some option in the genmodel you can control how annotations get written to files.

Diego Sevilla
Hmm, are you suggesting that I should write my own custom code generator or provide my own code-gen template? Can you point me to any resources in this regards? I found that CDO and Teneo try to address the same, but could not find a comprehensible tutorial.
questzen