Chris, we just figured this out.  It seems the orm.xml file needs to be in
the same directory as the persistence.xml file.  I injected the orm.xml
file into the rave-core-0.9-incubating.jar.  Then I had to re-package the
portal.war file so it included the new jar.

To point to a different User table we mapped the person table to a view
(personview) which referenced our internal user table.  We mapped to Person
instead of User since there is technically no user table, just extending
the person model.  Here is a copy of the orm.xml we used to accomplish this.

<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
    http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"; version="1.0">

<package>org.apache.rave.portal.model</package>
<entity class="org.apache.rave.portal.model.Person">
    <table name="personview" />
</entity>
</entity-mappings>


- Shawn


On Fri, Mar 30, 2012 at 11:38 AM, Chris Geer <[email protected]> wrote:

> We are looking to modify how Rave is mapping to the backend DB tables and
> have run into a wall. Our understanding is we can do this through a orm.xml
> file but we can't quite figure out where to put this file. Can we have it
> in our portal project (based on vanilla) or does it require us to insert it
> into the rave-core jar file?
>
> We would like to modify the Users mappings to point to our existing user
> table.
>
> Thanks,
> Chris
>

Reply via email to