Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsConfigure Dali Entitty Generator to create all @column annotations
https://www.eclipse.org/forums/index.php/mv/msg/317575/830174/#msg_830174
Is there a way to get the Dali Entity generator to generate all of the @column annotation attributes? At present, it's only creating the length attribute for varchar fields
e.g.
@Column(length=35)
Ideally, I would like it to generate the complete definition, something like:
@Column(length=35, name="address1", columnDefinition="xxx" ...)
and also the scale & precision for numeric fields.
The idea behind this is that this will give the ability to use the attributes at runtime for automatic data input validation, and even generation of data entry forms.
I could write the code to do this myself, but Dali presumably has all this information when it reads the table definition during entity creation and it makes sense to include the information with the application code.
Thoughts appreciated.
Thanks
]]>Colin Brown2012-03-27T09:41:42-00:00Re: Configure Dali Entitty Generator to create all @column annotations
https://www.eclipse.org/forums/index.php/mv/msg/317575/830342/#msg_830342
It looks like we have the capability to do this: on the 'Customize Defaults' page of the Entity generation wizard there is a check box 'Always generate optional JPA annotations and DDL parameters'. It seems like a bug to me that Dali doesn't completely follow through with what that check box says. Could you enter a bug for this against Web Tools -> Dali JPA Tools? Also, you can join us over on the Dali forum for future questions about Dali.