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
1 answer

My hibernate mapping files exist, what are possible reasons that the mapping can't be found?

I dynamically generated my hbms. Now when I attempt to use the HQL Editor in Eclipse, I'm getting the following error: Hibernate Dynamic SQL Window: HQL was valid, but no SQL generated. Your configuration most likely does not have any mappings…
coder
  • 6,111
  • 19
  • 54
  • 73
1
vote
0 answers

org.hibernate.hql.internal.ast.QuerySyntaxException: ContactEntity is not mapped [select c from ContactEntity c]

I am new to hibernate and trying to configure the JPA console in an eclipse to have some research on JPAQL. I followed https://www.youtube.com/watch?v=50Hx3N_a9as and setup the JPA console by downloading JBoss Hibernate tool successfully. Note: I…
user5778069
1
vote
1 answer

Hibernate Tools not recognizing many to many relation

When I try to auto-generate my entity classes, hibernate tools generates the many to many class and doesn't make the generation many to many. These are my tables: CREATE TABLE `role`( `id` int(13) not null auto_increment, name varchar(255), …
L Leon
  • 143
  • 1
  • 8
1
vote
1 answer

Generate entities with cascade delete

I am generating entities for our large database via JBoss hibernate reverse engineering. I was hoping to see cascade annotations in entities, but did not see them on generation. Is there a way to direct hibernate to consider foreign keys and…
nikel
  • 3,402
  • 11
  • 45
  • 71
1
vote
1 answer

InvocationTargetException when using Hibernate Tools 5.1.0.Final

EDIT: like an answer below says, this is a bug and it's been reported by someone else. I was trying to use Hibernate Tools to generate DTOs (this is a question I opened yesterday about that task) in a project of mine. I did an installation of…
AbVog
  • 1,435
  • 22
  • 35
1
vote
2 answers

Use SQL Information to Populate Schema Documentation and Code Comments Using Hibernate Tools?

I have set up Hibernate Tools from within Eclipse to autogenerate classes based on an existing DB. For each of the tables I have documented them and each of their columns within SQL Server. Is there a way to use that documentation information to…
1
vote
0 answers

How to describe(view all the columns) a table in Hibernate at run time?

I have a scenario, I am learning Hibernate. I have heard about the dynamic POJO classes(bytecode) in java. So I am assuming to create a POJO class Dynamically. For that,I need to know the name of the all columns in a Table(for a proper mapping),…
yashpal bharadwaj
  • 323
  • 2
  • 6
  • 14
1
vote
1 answer

Calling hbm2ddl from gradle

Is there a gradle plugin or any other means of calling the hibernate-tools hbm2ddl task to generate a database schema from annotated classes, without having to list all the entities (@Entity) in some configuration file but having them discovered in…
xtian
  • 2,908
  • 2
  • 30
  • 43
1
vote
1 answer

Hibernate reverse engineering cascade

I'm using the Hibernate Reverse Engineering to generate annotated entities and a cfg.xml for a very large non static set of database tables. Is it possible to tell the reverse engineering tool to set cascade all for all oneToOne and oneToMany…
1
vote
2 answers

How to see SQL query using Hibernate Tools in Eclipse?

Having installed Hibernate Tools in Eclipse, how can I view the would-be generated SQL query of from the JPA query language? (I'm using Hibernate as my JPA implementation) My Java DAO class looks something like: public List findById(int…
Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
1
vote
1 answer

Hibernate tools are not generating POJOs with Oracle sequence?

I am trying to generate Hibernate entity pojos using Hibernate Tools eclipse plugin/Maven Hibernate Plugin. POJOs are generating fine, but I need @Id to use the Oracle sequence as given below : @Id @GeneratedValue(strategy=GenerationType.SEQUENCE,…
sandeep
  • 43
  • 1
  • 6
1
vote
1 answer

Eclipse Hibernate tools not working anymore after DB switch

I am using hibernate tools with eclipse, and it was working fine, till I've changed my DB. I've configured the new database, run the test cases and every thing is fine, except for hibernate tools. The Hibernate console isn't fetching tables from DB…
Amr Faisal
  • 2,004
  • 6
  • 27
  • 36
1
vote
1 answer

Hibernate Tools Eclipse Classpath

How do I set the classpath in eclipse which is used by Hibernate Tools? I have tried right-clicking on my project, going to properties, then Java Build Path, then the Libraries tab, and adding the appropriate JARs. However, Hibernate Tools still…
David
  • 11
  • 3
1
vote
2 answers

why SQL Server timestamp type is mapped to Binary type in hibernate?

I have a table with a column type as TimeStamp in Mssql and generated pojos using hibernate(reverse engineering).In the generated Pojo,timestamp field is marked as byte[]. In the debugging process,I found TimeStamp sqlType code is "-2" that is…
Sunil Kumar
  • 5,477
  • 4
  • 31
  • 38
1
vote
2 answers

HIbernate reverse engineering configuration eager loading

I can't find any solutions on how to configure Hibernate reverse engineering tools (on Eclipse) for defining properties of domain classes fetch = FetchType.EAGER. PS:By default all foreign keys defining fetch = FetchType.LAZY For example I define…