On 11/29/07, jbarroso <[EMAIL PROTECTED]> wrote:
>
>
> Hi all!,
>
> I'm having problems with hibernate reverse engineering options in appfuse
> 2.0.1.
>
> I'm trying to change the generated pojo's name adding a <table> config
> element in hibernate.reveng.xml:
>
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE hibernate-reverse-engineering
> SYSTEM
> "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd"; >
>
> <hibernate-reverse-engineering>
>
>    <type-mapping>
>        <!-- jdbc-type is name fom java.sql.Types -->
>        <sql-type jdbc-type="VARCHAR" length='1' hibernate-type="yes_no"/>
>        <!-- length, scale and precision can be used to specify the mapping
> precisly -->
>        <sql-type jdbc-type="NUMERIC" precision='1'
> hibernate-type="boolean"/>
>        <!-- the type-mappings are ordered. This mapping will be consulted
> last,
>        thus overriden by the previous one if precision=1 for the column
> -->
>        <sql-type jdbc-type="BIGINT" hibernate-type="java.lang.Long"/>
>        <sql-type jdbc-type="INTEGER" hibernate-type="java.lang.Long"/>
>        <sql-type jdbc-type="NUMERIC" hibernate-type="java.lang.Long"/>
>    </type-mapping>
>
>    <!-- BIN$ is recycle bin tables in Oracle -->
>    <table-filter match-name="BIN$.*" exclude="true"/>
>
>    <table-filter match-name="app_user"/>
>
>    <!-- Exclude AppFuse tables from all catalogs/schemas -->
>    <table-filter match-name="role" exclude="true"/>
>    <table-filter match-name="user_role" exclude="true"/>
>
>    <table name="app_user" class="MyUser"/>
>
> </hibernate-reverse-engineering>
>
> -------
>
> Running appfuse:gen-model goal I always get AppUser.java instead of
> MyUser.java.


When I tried a similar exercise with SQL Server I had to specify both the
schema and the catalog before Hibernate tools would recognise the table:

 <table name="app_user" class="MyUser" schema="user_name"
catalog="db_name"/>

This pretty much applied to everything else as well.

Mike


> I've tried also with other options inside table element like <primary-key>
> with same results.
>
> Tested in Mysql and Oracle.
>
> Thanks!,
> -Jose.
> --
> View this message in context:
> http://www.nabble.com/hibernate-reverse-engineering-table-options-tf4897718s2369.html#a14027367
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to