db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Engelbert <c.engelb...@u-form.de>
Subject Re: Attibute modifications in schema
Date Thu, 30 Sep 2010 10:03:21 GMT


Am Donnerstag, den 30.09.2010, 11:43 +0200 schrieb Thomas Fischer:
> 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.

The intension wasn't to use Runtime-Annotations since the schema needs
to be build at compile-time (for maven users resource-generation time).
I don't want to change that behaviour since I'm totally agree with it.

About the problem with inheritance I guess there needs to be some
discussion. There would be one way which possibly most people around
here do not like, that would be bytecode enhancement after compilation.
Since this would be some kind of religious war I'm open to other
possibilites.

I would like to see some discussion on that topic.

> 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.

I would try to implement a SourceProvider in the first stage after there
was some discussion, enough interest and a basic concept how to
implement it.

> 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
> 


---------------------------------------------------------------------
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