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
2
votes
3 answers

Hibernate Tools 4.0.0 Detect many-to-many tables NOT working with MySQL Db

I am using Hibernate Tools to reverse engineer from a MySQL 5.5.27 using STS 2.9.2 and Hibernate Tools 4.0.0. It generates the POJO classes correctly, but is NOT picking up on the foreign key relationships defined across the tables (i.e. no sets nor…
2
votes
2 answers

Hibernate Tools: Mappings and Annotations Fail

This is driving me crazy -- I'm pretty sure that Hibernate can determine mapping relationships between tables and thus reflect this in the POJO's generated. Except it's not. I am using MySQL with STS & Hibernate Tools 4.0.0 and I have a one-to-many…
2
votes
2 answers

Add properties to getter-annotations in Freemarker reverse engineering templates?

I am trying to implement a FreeMarker custom reverse engineering template that automatically creates my Hibernate classes. In the build process, the template is used by hibernate-tools to generate the hibernate classes. So far, I am using the…
Pascal
  • 1,984
  • 1
  • 21
  • 25
2
votes
1 answer

How to specify Library Provided at Runtime for Hibernate - Eclipse Dali JPA integration

I am trying to add Eclipse Dali JPA integration and to specify Hibernate as the JPA implementation. I have gathered different instructions but am struggling with specifying the user library when configuring the project facet. The page here…
Dustin
  • 729
  • 1
  • 10
  • 25
2
votes
1 answer

Installed Hibernate Tools plugin for Eclipse but no access to code generation feature

I'm using Eclipse Helios SR2 and I've just installed the Hibernate tools plugin (via the update site : http://download.jboss.org/jbosstools/updates/stable/helios/). I now have the wizards to create the configuration file, mapping file and so on but…
kyiu
  • 1,926
  • 1
  • 24
  • 30
2
votes
2 answers

How to use hbm2ddl tool with Maven?

I would like to use the Hibernate3 plugin for Maven (developed by Codehaus) but according to the last release date (2009-01-21), it seems that it's not actively supported. I need to use the hbm2ddl tool provided by Hibernate. What do you…
manash
  • 6,985
  • 12
  • 65
  • 125
1
vote
1 answer

JNDI Session Factory Error with Tomcat and Hibernate

I am building a web application framework by making use of Spring MVC, Hibernate, JBoss Tools and JSFs. I have managed to generate domain classes and DAO classes by making use of JBoss Tools, however, when I try to construct the any DAO object(At…
unknown
  • 13
  • 5
1
vote
2 answers

eclipse hibernate plugin

Can somebody guide me how to install Hibernate tools in Eclipse. I am using Eclipse 3.3 ( I can upgrade to 3.4). I can use Hibernate 3.0 or 2.0. I am not able to install the plugin. Its not getting detected. The update site gives error saying that…
Kapil D
  • 2,662
  • 6
  • 28
  • 30
1
vote
1 answer

HQL class selection to DetachedCriteria (stackoverflow on too large ParameterList)

I have a serious problem: the ParameterList variable in my HQL has 10k+ elements, so Hibernate can't work with it (stackoverflow), now i'm trying to convert it into DetachedCriteria query, but it's look like this: final StringBuffer hql = new…
VORiAND
  • 145
  • 3
  • 17
  • 35
1
vote
0 answers

The hbm files generated by hibernate ant tools will miss the "DiscriminatorColumn"

I have defined a Article entity with hibernate annotations: @Entity @Table(name = "WZQ_ARTICLES") @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "ARTICLE_TYPE", discriminatorType =…
Freewind
  • 193,756
  • 157
  • 432
  • 708
1
vote
2 answers

how to close hibernate tools db connections

When developing a new project I often want to re-create the schema to apply any new entities or relationships created. I like using hibernate tools in eclipse, but it's a pain when wanting drop and re-create the schema - since it seems to maintain…
Tim
  • 966
  • 1
  • 13
  • 22
1
vote
2 answers

Hibernate Tools and the ever changing database

I am currently using Hibernate Tools 3.1; I customized naming convention and DAO templates. The database (SQL Server 2005) in early development phase and I'm in charge of rebuilding the mappings, entities, DAOs, configuration, whatever. Each time I…
Manrico Corazzi
  • 11,299
  • 10
  • 48
  • 62
1
vote
1 answer

How use Hibernate Tools to execute JPQL Queries?

I need to make some tests with JPQL, so I'm trying do that with Hibernate Tools, but when I try open the session factory appears this : Could not locate TransactionManager as showed below: Here is my persistence.xml file
Valter Silva
  • 16,446
  • 52
  • 137
  • 218
1
vote
1 answer

hibernate.transaction.auto_close_session throws "Session/EntityManager is closed" when set to true

When we set hibernate.transaction.auto_close_session to true, it is throwing java.lang.IllegalStateException: Session/EntityManager is closed . We are using hibernate 5.3.18.Final and spring 5.3.28 versions. When we set…
1
vote
1 answer

How can I use the latest version of Hibernate Tools with Gradle to reverse engineer persistence objects from the database?

Following along with the answer to this question, I was able to use Gradle to reverse engineer Java entities from a MySQL 8 database. However, the highest version of hibernate-tools and hibernate-core that worked without error is 4.3.5.Final. When…
S. Garcia
  • 11
  • 2