-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Reverse Engineering Problem - Classes/Properties Names
PostPosted: Mon Jun 01, 2015 6:44 pm 
Newbie

Joined: Mon Jun 01, 2015 6:34 pm
Posts: 1
Hi All.

I am trying to reverse engineering some tables. All my tries to configure classes names and properties names ares unsuccessful. I am using Netbeans 8.0.2, Hibernate 4.3.1, PostgreSQL 9.3.5.2,
all on Mac OS Yosemite.

My files:

hibernage.cfg.xml
Code:
<hibernate-configuration>
  <session-factory>
    <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
    <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
    <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/vvv</property>
    <property name="hibernate.connection.username">vvv</property>
    <property name="hibernate.default_catalog">vvv</property>
    <property name="hibernate.default_schema">public</property>
    <property name="hibernate.show_sql">true</property>
    <property name="hibernate.current_session_context_class">thread</property>
    <property name="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory</property>
  </session-factory>
</hibernate-configuration>


hibernate.reveng.xml
Code:
<hibernate-reverse-engineering>
  <schema-selection match-catalog="vvv" match-schema="public"/>
  <table-filter match-name="tb_disciplina"/>
  <table-filter match-name="tb_aluno"/>
  <table-filter match-name="tb_professor"/>
  <table-filter match-name="tb_sala"/>
  <table-filter match-name="tb_disciplina_aluno"/>
 
  <table name="tb_disciplina" schema="public" catalog="vvv" class="beans.Disciplina">
    <primary-key>
        <generator class="sequence">
            <param name="table">tb_disciplina_disc_id_seq</param>
        </generator>
        <key-column name="disc_id" />
    </primary-key>
    <column name="disc_nm" property="nome" type="string" />
    <column name="disc_carga" property="cargaHoraria" type="int" />
    <foreign-key constraint-name="tb_disciplina_prof_id_fkey" >
        <many-to-one property="professor" />
    </foreign-key>
   </table>

</hibernate-reverse-engineering>


I am trying to generate Hibernate Mapping Files and POJOs, with these configurations:

- JDK5
- EJB3
- Domain code (.java)
-NO XML Mapping (.hbm.xml)

Testing only in tb_disciplina table. Only the foreign-key column have its name changed. All columns, including table, maintain
default (TbDisciplina, discNm, etc).

Thank you in advance.


Top
 Profile  
 
 Post subject: Re: Reverse Engineering Problem - Classes/Properties Names
PostPosted: Wed Oct 19, 2016 2:28 pm 
Newbie

Joined: Wed Oct 19, 2016 2:24 pm
Posts: 1
Same problem,
i use Netbeans 8 and Oracle database , table name PATIENT pojo generator generate Patıent (not Patient)
please help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.