db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject Re: Attibute modifications in schema
Date Thu, 30 Sep 2010 09:43:55 GMT
Hi Christoph,

> I'll like the idea of using POJOs with annotations and I would be glat
> to see it in Torque as well. This would make things a lot easier since
> we use interfaces and concrete implementations. These implementations
> are wrapped by adapter-classes so annotations would be a great success
> to get rid of those adapters.
>
> I'll like to try myself on annotation-driven approach for Torque if more
> people like the idea.

Speaking on behalf of myself, not on behalf of the Torque community:
a) the question is how you want to use the annotation. I'd be strongly
against using annotations at runtime, this is not in the spirit of Torque.
There are plenty of frameworks around which do this, and this is terribly
difficult to debug. However, if one uses annotations as just another input
for the generator (i.e. the generator would scan for annotated classes and
generates the SQL, Peer classes etc from it), this would be fine with me.
However, certain restrictions will apply, e.g 1) the annotated classes must
probably be in the same package, 2) either we must remove the necessity
that the Torque objects must inherit from BaseObject or the annotated
classes must inherit from this interface, 3) etc.
b) I would welcome an annotation-based approach. I do not think
implementation would be too difficult given the 4.0 generator
implementation, it would mean to implement just another
org.apache.torque.generator.source.SourceProvider (there are already two of
them). Of course some design questions need to be splved, which might be
difficult in detail, but the implementation to the generator is
straightforward.
But personally, I will not be putting too much work into it. I'll be happy
to help with any design questions, but I'll definitely not work on the
implementation.

     Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message