Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dali-dev] best way to add annotations to an Entity?

Hi there,

What would be the best way for me to programatically add some annotations to existing entities? Can I reuse some of the JPA models? For instance, from inside of a wizard, how could I set a primary key annotation on a column?

It seems like there might be some JPA code that could be leveraged here. I see that JavaPersistentType updates the org.eclipse.jpa.core.java.mappings.JavaId column. Is there some way I can use Dali to assist in this (maybe the JpaCoreJavaMappingsFactory?) I could maybe just manually add the annotation myself, but I don't see an easy way to do this with eclipse JDT, and it wouldn't be as clean. Any ideas?

Thanks
Tom


Back to the top