Questions tagged [hibernate-tools]

Hibernate Tools is a toolset for Hibernate implemented as an integrated suite of Eclipse plugins, together with a unified Ant task for integration into the build cycle. Hibernate Tools is a core component of JBoss Tools and hence also part of JBoss Developer Studio.

Working with Hibernate is very easy and developers enjoy using the APIs and the query language. Even creating mapping metadata is not an overly complex task once you've mastered the basics. Hibernate Tools makes working with Hibernate or JPA even more pleasant.

Hibernate Tools is a toolset for Hibernate implemented as an integrated suite of Eclipse plugins, together with a unified Ant task for integration into the build cycle. Hibernate Tools is a core component of JBoss Tools and hence also part of JBoss Developer Studio.

The following features are available within Eclipse :

Mapping Editor : An editor for Hibernate XML mapping files, supporting auto-completion and syntax highlighting. The editor even supports semantic auto-completion for class names, property/field names, table names and column names.

Console : The Hibernate Console perspective allows you to configure database connections, provides visualization of classes and their relationships and allows you to execute HQL queries interactively against your database and browse the query results.

Reverse Engineering : The most powerful feature of Hibernate Tools is a database reverse engineering tool that can generate domain model classes and Hibernate mapping files, annotated EJB3 entity beans, HTML documentation or even an entire JBoss Seam application in seconds!

Wizards : Several wizards are provided, including wizards to quickly generate Hibernate configuration (cfg.xml) files, and Hibernate console configurations.

Ant task : The Hibernate3 tools include a unified Ant task that allows you to run schema generation, mapping generation, or Java code generation as part of your build.

Links :
Hibernate Tools
JBoss Tools Eclipse Plugins
JBoss Tools Documentation
JBoss Tools Movies

198 questions
1
vote
4 answers

Generate service layer with Hibernate

I generate .hbm.xml mapping files and .java files from the DB schema, with Hibernate Tools. My question is, that is there any option, to generate service classes also? These are the classes where I implement the store(), find(), delete(), etc...…
Mate Gulyas
  • 609
  • 2
  • 8
  • 22
1
vote
2 answers

Hibernate Tools - DAO generation

I am using the eclipse hibernate tools plug-in to reverse engineer my database. I spent my whole day looking for how to force the DAO generator to use HQL/Criteria with the session factory, transaction, etc. Right now, if I have the table TABLE in…
Julio Guerra
  • 5,523
  • 9
  • 51
  • 75
1
vote
0 answers

hbm2ddl not working for audit tables in hibernate-tool 4

I am using hibernate 4.2.0.Final and hibernate tool 4.0.0-CR1 in my application. I am trying to execute ant task hibernatetool to generate ddl statements from the entity annotations, Its working fine for normal tables but for audit tables its not…
1
vote
1 answer

Hibernate code generation for non identifying relation

I have the following table structure, TableA: aid int, (PK) name varchar(255), bid TableB is having composite primary key(bid, tid, mid) TableB: bid int, (PK) tid int, (PK) mid int, (PK) name varchar(255) When I try to generate code using the…
Gokul Kulkarni
  • 2,069
  • 3
  • 26
  • 42
1
vote
1 answer

Where can I see the differents "Hibernate Console Configurations" in Eclipse

I am creating different Hibernate Console Configurations in order to execute a reverse engineering process whit Eclipse IDE. This is due to the fact that when I create a single Hibernate Console Configuration, i dont' find the way to edit this same…
1
vote
1 answer

Hibernate + MySQL custom boolean type

Hibernate tool generate tinyint(1) to boolean type in javacode. with default value: 0 false, 1 true But i want to change 1: false and 0: true. How i can do it? I have added true 0, false 1 in my…
1
vote
1 answer

Hibernate Reverse Engineering using DelegatingReverseEngineeringStrategy

I am trying to generate the pojos and hbm files using DelegatingReverseEngineeringStrategy. I am able to customize things like implementing interface, toString method, eager fetch for all table objects. However, I need to customize two more…
Anky
  • 56
  • 5
1
vote
1 answer

How to stop hibernate tools from implementing the Serializable interface

I'm using hibernate tools to generate the entities, mapping to the tables. Each entity class that is generated is implementing the Serializable interface by default. How can we actually stop the tool from implementing Serializable interface. Below…
1
vote
0 answers

hbm2java reverse engineering to use List and ArrayList instead of Set and HashSet

I use hbm2java plugin in Eclipse to generate the entity classes. The tool decides to use Set and HashSet for relationships between tables. What I want is to use List and ArrayList() instead. How easy to do that?
zoro74
  • 171
  • 15
1
vote
1 answer

My ant build suddenly started giving javax.naming.NoInitialContextException: Need to specify class name in environment or system property

I have a build.xml file which was working perfectly till yesterday, today it suddenly stared giving below exception... I did not do any modifications in the application, it was successfully identifying JNDI name previously, I cannot understand what…
1
vote
2 answers

Hibernate Tools - Eclipse Luna Reverse Engineer Error - NoClassDefFoundError: org.hibernate.cfg.reveng.OverrideRepository

I get the following error in Eclipse Luna using the latest Hibernate-tools to attempt to reverse engineer my tables into Hibernate objects. I'm using JDK 8 to run Eclipse, 1.8 as my compliance levels and I've tried 1.7 and still the same error. I…
chrislhardin
  • 1,747
  • 1
  • 28
  • 44
1
vote
0 answers

Eclipse Kepler, Hibernate Tools and SQL Server code generation fails can't find database

I am attempting to use code generation in Hibernate tools but it is failing. It seems to be quoting the database name somehow and I can't figure out why. I really have a lot of tables I need to generate and I don't want to do it by hand... Anyone…
chrislhardin
  • 1,747
  • 1
  • 28
  • 44
1
vote
2 answers

Lazy mapping with hibernate tools?

I have two tables A and B in my database. I the table B I have a reference to the table A by an Integer idA. (idA is a foreign key for B) When I do reverse engineering using hibernate-tools, I generate two Java objects. public class A{ int id; }…
Mouna
  • 3,221
  • 3
  • 27
  • 38
1
vote
1 answer

Hibernate3 Maven Plugin ERROR: Could not create or find "MyReverseStrategy.java" with one argument delegate constructor?

I am using Hibernate3 Maven Plugin to reverse engineering, this is a part of my pom.xml org.codehaus.mojo hibernate3-maven-plugin 2.2
1
vote
1 answer

How to tell hibernate tools to generate classes with the same name of my database tables?

I use eclipse hibernate tools to generate classes from database tables. But I get classes names different from those of my database. For example I have a table that I call OT_XML in my database and the generated java class is called OtXml. I have a…
Mouna
  • 3,221
  • 3
  • 27
  • 38