You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Kennedy, Dan" <dk...@170Systems.com> on 2007/02/01 16:28:07 UTC

ReverseMappingTool doesn't include table/column names in entities

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

Re: ReverseMappingTool doesn't include table/column names in entities

Posted by Abe White <aw...@bea.com>.
This sounds like something that was fixed a while ago.  What version  
of OpenJPA are you using?
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.