openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kennedy, Dan" <dkenn...@170Systems.com>
Subject ReverseMappingTool doesn't include table/column names in entities
Date Thu, 01 Feb 2007 15:28:07 GMT
Hi,
 
I'm using the ReverseMappingTool to reverse an Oracle schema.  When I do
this everything works great, except the entities it generates do not
include the actual table name.  So, for example, if I've got a table
called DEPARTMENT_STORE it creates an entity like:
 
    <entity class="DepartmentStore">
        <id-class class="DepartmentStore$Id"/>
        <attributes>
            <id name="departmentStoreId"/>
            <basic name="storeName"/>
        </attributes>
    </entity>

However, using this definition at runtime throws an error because it
tries to use the class name as the table name.  I know I can add a
"table" element and column elements myself:
 
    <entity class="DepartmentStore">
        <table name="DEPARTMENT_STORE"/>
        <id-class class="DepartmentStore$Id"/>
        <attributes>
            <id name="departmentStoreId">
               <column name="DEPARTMENT_STORE_ID"/>
            </id>
            <basic name="storeName">
               <column name="STORE_NAME"/>
            </basic>
        </attributes>
    </entity>

But it seems like the ReverseMappingTool must know this information, so
why doesn't it include it in the generated data?  Is there some property
I can set to have it do this automatically?
 
Thanks.
 
-- Dan

Mime
View raw message