Posts Tagged ‘Hibernate’
Tuesday, August 17th, 2010
Since IntelliJ IDEA X property names can be completed and navigated. Unrecognized properties are highlighted by the corresponding inspection.
The screenshot says it all in a visual manner.

Download IntelliJ IDEA X EAP build and try this feature.
Tags: Code Completion, Hibernate, ideaX, Persistence
Posted in New Features | No Comments »
Monday, March 1st, 2010
The latest IntelliJ IDEA 9.0.2 EAP contains a big number of Database-related functionality changes:
- Database Console now has its own toolwindow
- New console-like UI that keeps input and output in one place and retains the highlighting for execution history
- Keyboard shortcuts for all Console actions are now configurable
- Per-result Page Up, Page Down and Refresh actions
- Complete support for In-Memory Databases (try running some DDL in Console then click Refresh Tables and all the tables will be loaded in the Data Sources tree)
- Improved support for heavy JDBC drivers that use native libraries to run
- The notion of Database Connection allows IntelliJ IDEA to do some cool stuff such as Quick Table Contents Lookup integrated with Quick Documentation Lookup (Ctrl+Q)

The Hibernate Console has also been improved accordingly (separate toolwindow, console-like UI and per-result paging actions).
Try all this in the latest EAP and let us know what you think.
UPD: In the next EAP SQL scripts can be run directly from Project View or Editor via Run SQL Script (Ctrl+Shift+F10).
Tags: Database Tools, Hibernate
Posted in New Features | 15 Comments »
Monday, April 27th, 2009
The upcoming IntelliJ IDEA 8.1.1 includes a new option to generate separate XML mapping per entity.

Tags: Code Generation, Database, Hibernate, JPA
Posted in New Features | 1 Comment »
Wednesday, March 18th, 2009
With IntelliJ IDEA you can quickly generate persistence mappings from any database schema. This feature is not so easy to find, so here’s the tip:

Tags: Code Generation, Database, Hibernate, JPA
Posted in New Features, Tips & Tricks | No Comments »
Wednesday, March 18th, 2009
In IntelliJ IDEA HQL console can be used with pure JPA facets (as well as with Hibernate facets) to run JPAQL and HQL queries. All you need is Hibernate libraries and JDBC driver in a module classpath. If persistence.xml contains no Hibernate-specific database connection options, it should be mapped to an existing data source via JPA facet settings.

Tip: HQL console can also be used to generate DDL statements for JPA and Hibernate mappings via its Generate DDL command.
Update: If a Persistence Unit or Session Factory is mapped to a valid local Data Source there is no need to specify JDBC driver jars in a module classpath (Since 8.1.1).
Tags: Code Generation, Database, Hibernate, JPA
Posted in Tips & Tricks | 5 Comments »
Tuesday, March 17th, 2009
In IntelliJ IDEA you can quickly navigate within JPA/Hibernate ER-Diagram using the File Structure Popup (press Ctrl+F12, or invoke View menu, File Structure Popup command):

Tags: ER-Diagram, Graphs, Hibernate, JPA, Navigation
Posted in Tips & Tricks | 2 Comments »
Friday, June 15th, 2007
IntelliJ IDEA 7 M1 introduces the full-blown support for Spring and Hibernate through the dedicated facets. Traditionally, Spring and Hibernate are integrated with a wide range of IntelliJ IDEA productivity-boosting features.
With IntelliJ IDEA you can create Spring applications from scratch with just few keystrokes.
Here I outline some examples that demonstrate how IntelliJ IDEA can help you.
- Context files are created from templates
- ALT+INS inside of a context file lets instantly add beans and patterns
- Very wide range of beans is supported. Each of them is created through a dedicated live template — all you have to do is to type values for required properties.

(More live templates to come in later builds)
- If required libraries are missing from your system, they can be automatically downloaded and configured
- You don’t need to dig through class files to manually generate properties, just select them from the list
- Quick-fixes are available for rapid error resolution
- HIbernate diagram not only displays relationships, but lets you create classes and entities, automatically generating required code.
- As always, CTRL+SPACE code completion helps you with bean names, property values, settings and tons of other stuff. It can recognize your entire project structure and help even with beans you created by annotating Java code.
- IntelliJ IDEA refactorings are also Spring and Hibernate-aware, so you can modify and upgrade your projects at the full pace.
To get your hands on and try Spring with IntelliJ IDEA, download the latest EAP build of IntelliJ IDEA 7 M1.
Tags: Hibernate, Spring
Posted in New Features | 1 Comment »
Thursday, September 14th, 2006
IntelliJ IDEA 6.0 features numerous enhancements for making Java EE development easier and more productive.
EJB relationship diagram builder brings valuable bonus to those who use Hibernate annotations for defining data models in their applications. All the power of the EJB diagram builder is at your disposal. You can get the complete picture of how your Hibernate entities relate one to another, and navigate through their relationships in just a couple of mouse clicks.

Just right-click the persistence unit where your Hibernate annotations are used and select Open ER Diagram. IntelliJ IDEA will build the relationship diagram showing entities and their relationships. Helpful tooltips are available when you hover your mouse pointer over diagram elements.

There’s a small catch, however. If your Hibernate annotations are placed through the Java code somewhere in one of your Java (not Java EE) modules, you will need to peform some initial steps, for the diagram builder to recognize them:
- Create the file named persistence.xml in your module’s META-INF folder.
- Populate it with the stub code as follows:
- Switch to the Java EE Project View and select Java Modules from the tree. You should see the MyHibernateUnit persistence unit.
- Now you can build the diagram that reflects relationships between your Hibernate-annotated entities.
The latest builds of IntelliJ IDEA 6.0 where this feature is available, can be obtained through the IntelliJ IDEA EAP. The final release is scheduled to the mid of fall, 2006.
Tags: Hibernate, Java EE
Posted in New Features | 6 Comments »