RE: [Objectbridge-developers] [Fwd: [objectbridge - Open Discussion] New repository.xml/dtd proposa
Brought to you by:
thma
From: <ll...@li...> - 2001-08-28 23:14:26
|
Something about this strikes me as beeing wrong - or at least questionable. To me a persistence framework must be easy to work with, transperent and flexible in that order. It is good to have the flexibility that the mapping files allows. But I am wondering if the usecase in 99% of the cases is that you just want the database names to be the same as the ones in the fields. - so the database collumn name should be optionable. To do that the table and the class mappings can't go in two different mappings. That scheme also seems to be hard to maintain - you'd have to remember making changes two different places. How about just tossing the table and class mapping into just one xml-block: <mapping class="test.ojb.broker.BookArticle" table="article"> <field javaname="id" collumn="article_id" type="integer"> <field javaname="Price" type="integer"/> </mapping> Price would default to a collumn names price in the database. /Lasse |