openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: Custom Annotations
Date Wed, 13 Oct 2010 15:27:08 GMT
Idan -

 First off, can I ask what are the custom annotations are that you want to
add? Do you plan on contributing them back to OpenJPA? I'll try my best to
answer your questions here...

> So far I understood i'll probably have to replace
AnnotationPersistenceMetaDataParser with my own implementation which will
take care of my custom annotations and somehow add
You'll probably need to extend AnnotationPersistenceMappingParser to parse
out the new annotation and the information should be stored in field/class
metadata.

> My final (for now) goal is to add extra SQL syntax to the create table
statement for the custom annotated fields. What would be the best way to
eventually pass this information to DBDictionary's getCreateTableSQL method?
What DBs support the additional SQL that you want to issue? If it is generic
and all DBs *should* support it, yes the DBDictionary is the proper place.
If it isn't supported by all DBs you'll need to put it in the proper
dictionary. ie:MySQLDictionary


Thanks,
Rick

On Wed, Oct 13, 2010 at 9:50 AM, idan <idanmo@gmail.com> wrote:

>
> Heya,
>
> I'd like to add my own custom annotations to OpenJPA (field annotations).
>
> So far I understood i'll probably have to replace
> AnnotationPersistenceMetaDataParser with my own
> implementation which will take care of my custom annotations and somehow
> add
> them to the existing or my own derived FieldMetaData implementations.
>
> My final (for now) goal is to add extra SQL syntax to the create table
> statement for the custom annotated fields.
>
> What would be the best way to eventually pass this information to
> DBDictionary's getCreateTableSQL method?
>
> Thanks,
> Idan
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message