openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kennedy, Dan" <>
Subject ReverseMappingTool doesn't include table/column names in entities
Date Thu, 01 Feb 2007 15:28:07 GMT
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"/>
            <id name="departmentStoreId"/>
            <basic name="storeName"/>

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"/>
            <id name="departmentStoreId">
               <column name="DEPARTMENT_STORE_ID"/>
            <basic name="storeName">
               <column name="STORE_NAME"/>

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

View raw message