Author Archive
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: Console, Database, Hibernate, JDBC
Posted in FYI, In Development | 9 Comments »
Monday, March 1st, 2010
Since IntelliJ IDEA 9.0.2 Database Diagram supports drag-and-drop for adding more tables to the view. The screenshot below shows the way to access the diagram if you somehow missed the What’s New in 9.0 page.

You can try this right now in the latest EAP.
Tags: Database, Diagram, UML
Posted in FYI, In Development | No Comments »
Thursday, November 19th, 2009
Maia build subsystem now recognizes Java Annotation Processors. Most of JPA 2.0 implementations are expected to make use of the Pluggable Annotation Processing API to automatically generate static metamodel classes. Here is a list of steps required to generate JPA 2.0 metamodel and keep it up-to-date with Hibernate Static Metamodel Generator. For the simplicity in this sample project the processor jar file is added to the module dependencies.
 |
- Enable annotation processing
- Select Obtain processors from project classpath option
- Add a processor class name to the Processors list
- Add a module with annotated classes to the list of modules to process
- To output generated classes to a generated directory under module content root, set Generated Sources Directory Name to generated. Note that this directory will not be set as a source root automatically.
|
Now, Annotation processors will be run every time you invoke Make or Compile. Besides, there is a special menu item Process Annotations that does exactly what its name says. In this sample project I have added the generated directory to project sources to get completion in JPA 2.0 Typesafe Criteria API calls. Enjoy, Comment.

Tags: Annotation Processing, JPA 2.0, JSR 269, JSR-317, Make, Persistence
Posted in FYI, How-To's | 12 Comments »
Tuesday, June 9th, 2009
Instead of wasting your time searching the menus and toolbars in an attempt find out that action you need right now, use the Find Action command (Ctrl+Shift+A) to quickly locate what you need. It works just like Go to Class:

Tags: Navigation
Posted in FYI, How-To's, Tips & Tricks | 1 Comment »
Monday, June 1st, 2009
In Maia the Show Parameter Info action (Ctrl+P) is available in SQL function calls and value expressions.

Tags: editor, maia, sql
Posted in FYI, In Development, Tips & Tricks | 1 Comment »
Tuesday, May 26th, 2009
First Maia EAP brings you the following JavaEE support improvements:
- EJB 3.1 @Singleton Session Bean

- JPA 2.0 @ElementCollection attribute type, plus freshly allowed attribute types in embeddable objects (@OneToOne, @Embedded, etc.)
- JPA 1.0/2.0 with Hibernate provider will not throw false-positive warnings about certain JPA specification violations that occur because of differences in JPA and Hibernate.
Tags: EJB 3.1, Javaee 6, JPA 2.0, maia
Posted in FYI, In Development | No 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 FYI, How-To's, Tips & Tricks | 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 How-To's, 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 How-To's, Tips & Tricks | 2 Comments »