You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Brian McCallister <br...@chariotsolutions.com> on 2005/01/13 17:44:20 UTC
[proposal] AutoMapping
Would it be worthwhile to provide an automagic mapping facility which
will attempt to figure out reasonable mappings given classes and a
database connection?
It seems that for a lot of (typically small) projects direct Class <->
Table mappings with very similar names (article Article, sales_invoices
SalesInvoice) and similar column/relation mappings (even fk's typically
fall into Category#getArticles(): Collection<Article>)
Would a configurator which can interrogate a set of classes and a
schema to dynamically build mappings (possibly with a facility for
interacting with either xml metadata, or on-class
(xdoclet/annogen/statics) to override automagic settings be worth
working on?
I would need to finish up the unit of work stuff (though have never
gotten feedback on it other than "yes would be nice to have" so not
sure if it *should* be finished rather than removed...) before doing
anything here, though.
-Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org
Re: [proposal] AutoMapping
Posted by Thomas Dudziak <to...@gmail.com>.
Actually I was already planning to create something like this. As I
proposed in july
(http://marc.theaimsgroup.com/?l=ojb-dev&m=108948219020376&w=2), I'd
like to merge OJB's metamodel (class descriptor etc.) with the XDoclet
metamodel. This would enable us to use the constraints that are
already available for the XDoclet model, for the OJB model as well.
>From there it is IMO only a small step to support annotations
(including JDO2 annotations ?!) and to generate a basic mapping via
Beanutils and reflection, both even at runtime (no repository file
necessary).
But I wonder whether it would be better to first implement generics
and enum support ?
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org